本文整理汇总了C#中BaseEntity.ToXmlString方法的典型用法代码示例。如果您正苦于以下问题:C# BaseEntity.ToXmlString方法的具体用法?C# BaseEntity.ToXmlString怎么用?C# BaseEntity.ToXmlString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseEntity
的用法示例。
在下文中一共展示了BaseEntity.ToXmlString方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Add
public static DataRow Add(BaseEntity news)
{
using (DbCommand cmd = DB.Gt.GetStoredProcCommand(AddProcName))
{
DB.Gt.AddInParameter(cmd, "@News", DbType.Xml, news.ToXmlString());
return DB.Gt.ExecuteDataRow(cmd);
}
}
示例2: AddImage
public static DataRow AddImage(BaseEntity sellingImage)
{
using (DbCommand cmd = DB.Gt.GetStoredProcCommand(ProcNames.AddImage))
{
DB.Gt.AddInParameter(cmd, "@SellingImage", DbType.Xml, sellingImage.ToXmlString());
return DB.Gt.ExecuteDataRow(cmd);
}
}
示例3: AddFeedback
public static DataRow AddFeedback(BaseEntity feedback)
{
using (DbCommand cmd = DB.Gt.GetStoredProcCommand(ProcNames.AddFeedback))
{
DB.Gt.AddInParameter(cmd, "@Feedback", DbType.Xml, feedback.ToXmlString());
return DB.Gt.ExecuteDataRow(cmd);
}
}
示例4: Read
public static DataRow Read(BaseEntity message)
{
using (DbCommand cmd = DB.Gt.GetStoredProcCommand(ReadProcName))
{
DB.Gt.AddInParameter(cmd, "@Message", DbType.Xml, message.ToXmlString());
DataSet ds = DB.Gt.ExecuteDataSet(cmd);
return ds.Tables[0].Rows[0];
}
}
示例5: Add
public static DataRow Add(BaseEntity wm)
{
using (DbCommand cmd = DB.Gt.GetStoredProcCommand(AddProcName))
{
DB.Gt.AddInParameter(cmd, "@wm", DbType.Xml, wm.ToXmlString());
DataRow dr = DB.Gt.ExecuteDataRow(cmd);
return dr;
}
}
示例6: AddTransfer
public static DataRow AddTransfer(BaseEntity transfer, out int resultCode)
{
using (DbCommand cmd = DB.Gt.GetStoredProcCommand(AddTransferProcName))
{
DB.Gt.AddInParameter(cmd, "@Transfer", DbType.Xml, transfer.ToXmlString());
DB.Gt.AddOutParameter(cmd, "@ResultCode", DbType.Int32, 0);
DataRow dr = DB.Gt.ExecuteDataRow(cmd);
resultCode = TypeConverter.ToInt32(cmd.Parameters["@ResultCode"].Value);
return dr;
}
}
示例7: AddOffer
public static DataRow AddOffer(BaseEntity bo, out int historyId)
{
using (DbCommand cmd = DB.Gt.GetStoredProcCommand(ProcNames.Add))
{
DB.Gt.AddInParameter(cmd, "@Offer", DbType.Xml, bo.ToXmlString());
DB.Gt.AddOutParameter(cmd, "@HistoryOfferId", DbType.Int32, 1);
DataRow dr = DB.Gt.ExecuteDataSet(cmd).Tables[0].Rows[0];
historyId = TypeConverter.ToInt32(cmd.Parameters["@HistoryOfferId"].Value);
return dr;
}
}
示例8: CancelConfirmedOffer
public static int CancelConfirmedOffer(BaseEntity offer, BaseEntity transfer, out int history, out DataRow cancaledOffer)
{
using (DbCommand cmd = DB.Gt.GetStoredProcCommand(ProcNames.CancelConfirmedOffer))
{
DB.Gt.AddInParameter(cmd, "@Offer", DbType.Xml, offer.ToXmlString());
DB.Gt.AddInParameter(cmd, "@Transfer", DbType.Xml, transfer.ToXmlString());
DB.Gt.AddOutParameter(cmd, "@Resultcode", DbType.Int32, 0);
DB.Gt.AddOutParameter(cmd, "@HistoryId", DbType.Int32, 0);
DataSet ds = DB.Gt.ExecuteDataSet(cmd);
history = TypeConverter.ToInt32(cmd.Parameters["@HistoryId"].Value);
if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count == 1)
{
cancaledOffer = ds.Tables[0].Rows[0];
}
else
{
cancaledOffer = null;
}
return TypeConverter.ToInt32(cmd.Parameters["@Resultcode"].Value);
}
}
示例9: Search
public static DataTable Search(BaseEntity filter)
{
using (DbCommand cmd = DB.Gt.GetStoredProcCommand(SearchMessagesProcName))
{
DB.Gt.AddInParameter(cmd, "@Filter", DbType.Xml, filter.ToXmlString());
DataSet ds = DB.Gt.ExecuteDataSet(cmd);
return ds != null && ds.Tables.Count > 0 ? ds.Tables[0] : null;
}
}
示例10: SearchOffers
public static DataSet SearchOffers(BaseEntity filter)
{
using (DbCommand cmd = DB.Gt.GetStoredProcCommand(ProcNames.SearchOffers))
{
DB.Gt.AddInParameter(cmd, "@Filter", DbType.Xml, filter.ToXmlString());
return DB.Gt.ExecuteDataSet(cmd);
}
}
示例11: Update
public static DataRow Update(BaseEntity offer, out int historyId)
{
using (DbCommand cmd = DB.Gt.GetStoredProcCommand(ProcNames.Update))
{
DB.Gt.AddInParameter(cmd, "@Offer", DbType.Xml, offer.ToXmlString());
DB.Gt.AddOutParameter(cmd, "@History", DbType.Int32, 0);
DataRow res = DB.Gt.ExecuteDataSet(cmd).Tables[0].Rows[0];
historyId = TypeConverter.ToInt32(cmd.Parameters["@History"].Value);
return res;
}
}
示例12: DeleteOffer
public static int DeleteOffer(BaseEntity offer, BaseEntity transfer, out int historyId)
{
using (DbCommand cmd = DB.Gt.GetStoredProcCommand(ProcNames.Delete))
{
DB.Gt.AddInParameter(cmd, "@Offer", DbType.Xml, offer.ToXmlString());
if (null != transfer)
{
DB.Gt.AddInParameter(cmd, "@Transfer", DbType.Xml, transfer.ToXmlString());
}
DB.Gt.AddOutParameter(cmd, "@SellingHistoryId", DbType.Int32, 0);
DB.Gt.AddOutParameter(cmd, "@ResultCode", DbType.Int32, 0);
DB.Gt.ExecuteNonQuery(cmd);
historyId = Convert.ToInt32(DB.Gt.GetParameterValue(cmd, "@SellingHistoryId"));
return Convert.ToInt32(DB.Gt.GetParameterValue(cmd, "@ResultCode"));
}
}
示例13: ConfirmOffer
public static int ConfirmOffer(int offerId, string key, BaseEntity transfer, out int history, out DataRow offer)
{
using (DbCommand cmd = DB.Gt.GetStoredProcCommand(ProcNames.ConfirmOffer))
{
DB.Gt.AddInParameter(cmd, "@OfferId", DbType.Int32, offerId);
DB.Gt.AddInParameter(cmd, "@Key", DbType.StringFixedLength, key);
DB.Gt.AddInParameter(cmd, "@Transfer", DbType.Xml, transfer.ToXmlString());
DB.Gt.AddOutParameter(cmd, "@Resultcode", DbType.Int32, 0);
DB.Gt.AddOutParameter(cmd, "@HistoryId", DbType.Int32, 0);
DataSet ds = DB.Gt.ExecuteDataSet(cmd);
history = TypeConverter.ToInt32(cmd.Parameters["@HistoryId"].Value);
if (ds != null && ds.Tables.Count > 1 && ds.Tables[1].Rows.Count == 1)
{
offer = ds.Tables[1].Rows[0];
}
else
{
offer = null;
}
return TypeConverter.ToInt32(cmd.Parameters["@Resultcode"].Value);
}
}