本文整理汇总了C#中StoredProcedure.ExecuteReturn方法的典型用法代码示例。如果您正苦于以下问题:C# StoredProcedure.ExecuteReturn方法的具体用法?C# StoredProcedure.ExecuteReturn怎么用?C# StoredProcedure.ExecuteReturn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StoredProcedure
的用法示例。
在下文中一共展示了StoredProcedure.ExecuteReturn方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SaveCategory
public static int SaveCategory(int? p_ParentCategoryID, string p_Name, string p_CategoryCode, bool p_bShowOpen, string p_Picture)
{
StoredProcedure sp = new StoredProcedure("p_Categories_i");
sp["@ParentCategoryID"].Value = p_ParentCategoryID==null?DBNull.Value:(object) p_ParentCategoryID;
sp["@Name"].Value = p_Name.Trim();
sp["@CategoryCode"].Value = p_CategoryCode.Trim();
sp["@ShowOpen"].Value = p_bShowOpen;
sp["@Picture"].Value = p_Picture;
return sp.ExecuteReturn();
}
示例2: SaveCustomerAddress
public static int SaveCustomerAddress(DataBaseTransaction p_tran, int p_CustomerID, string p_Address1, string p_Address2, string p_City, string p_State, string p_ZIP, int p_Country, string p_DayPhone, string p_MobilePhone, string p_Email)
{
StoredProcedure sp = new StoredProcedure("p_CustomerAddresses_i", p_tran);
sp["@CustomerID"].Value = p_CustomerID;
sp["@Address1"].Value = p_Address1.Trim();
sp["@Address2"].Value = p_Address2 == null ? DBNull.Value : (object)p_Address2;
sp["@City"].Value = p_City.Trim();
sp["@State"].Value = p_State.Trim();
sp["@ZIP"].Value = p_ZIP.Trim();
sp["@Country"].Value = p_Country;
sp["@DayPhone"].Value = p_DayPhone;
sp["@MobilePhone"].Value = p_MobilePhone.Trim();
sp["@Email"].Value = p_Email.Trim();
return sp.ExecuteReturn();
}