本文整理汇总了C#中Database.StoreprocedureExecuteQueryReturned方法的典型用法代码示例。如果您正苦于以下问题:C# Database.StoreprocedureExecuteQueryReturned方法的具体用法?C# Database.StoreprocedureExecuteQueryReturned怎么用?C# Database.StoreprocedureExecuteQueryReturned使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Database
的用法示例。
在下文中一共展示了Database.StoreprocedureExecuteQueryReturned方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetUserDetails
public UserLoginResult GetUserDetails(string email, string password,ref UserDetails userDetailsOu)
{
var result = new UserDetails();
Database db = new Database();
string[,] str = new string[1, 2];
str[0, 0] = "@Email";
str[0, 1] = email;
string xmlResult = db.StoreprocedureExecuteQueryReturned("usp_GetUserDetails", str);
var serializer = new XmlSerializer(typeof(UserDetails));
if (!string.IsNullOrEmpty(xmlResult))
{
using (var reader = new StringReader(xmlResult))
{
result = (UserDetails)serializer.Deserialize(reader);
}
}
if (result != null)
{
//string pswd = encryptionService.CreatePasswordHash(password, "SHA1");
if (encriptDecript.Decrypt(result.Password) == password)
{
userDetailsOu = result;
return UserLoginResult.Successful;
}
else
{
return UserLoginResult.WrongPassword;
}
}
return UserLoginResult.NotRegistered;
}
示例2: GetPEDOnCategory
public PEDOnCategory GetPEDOnCategory(string product, string store)
{
var result = new PEDOnCategory();
Database db = new Database();
string[,] str = new string[2, 2];
str[0, 0] = "@productId";
str[0, 1] = product;
str[1, 0] = "@storeId";
str[1, 1] = store;
try
{
string xmlResult = db.StoreprocedureExecuteQueryReturned("usp_GetPEDOnCategory", str);
var serializer = new XmlSerializer(typeof(PEDOnCategory));
using (var reader = new StringReader(xmlResult))
{
result = (PEDOnCategory)serializer.Deserialize(reader);
return result;
}
}
catch (Exception)
{
return new PEDOnCategory();
}
}
示例3: ChangePassword
public void ChangePassword(string Email, string Password)
{
Database db = new Database();
string[,] str = new string[2, 2];
str[0, 0] = "@Email";
str[0, 1] = Email;
str[1, 0] = "@Password";
str[1, 1] =encriptDecript.Encrypt(Password);
db.StoreprocedureExecuteQueryReturned("usp_ChangeUserPassword", str);
}
示例4: UpdateUploadedDate
public int UpdateUploadedDate()
{
Database db = new Database();
var user = System.Web.HttpContext.Current.Cache["AdminInfo"] as UserDetails;
string[,] str = new string[1, 2];
str[0, 0] = "@Email";
str[0, 1] = user.Username;
db.StoreprocedureExecuteQueryReturned("usp_UpdateUploadedDate", str);
return 1;
}
示例5: UpdateUser
public string UpdateUser(string name, string contact, string password, string email)
{
Database db = new Database();
string[,] str = new string[4, 2];
str[0, 0] = "@Name";
str[0, 1] = name;
str[1, 0] = "@Contact";
str[1, 1] = contact;
str[2, 0] = "@Password";
str[2, 1] = encriptDecript.Encrypt(password);
str[3, 0] = "@Email";
str[3, 1] = email;
string result = db.StoreprocedureExecuteQueryReturned("usp_UpdateUserDetails", str);
return result;
}
示例6: GetItemDetails
public void GetItemDetails()
{
var result = new ItemDetails();
Database db = new Database();
string[,] str = new string[1, 2];
str[0, 0] = "@action";
str[0, 1] = "all";
string xmlResult = db.StoreprocedureExecuteQueryReturned("usp_GetDashboardCountDetails", str);
var serializer = new XmlSerializer(typeof(ItemDetails));
if (!string.IsNullOrEmpty(xmlResult))
{
using (var reader = new StringReader(xmlResult))
{
result = (ItemDetails)serializer.Deserialize(reader);
}
}
HttpContext.Current.Cache["ItemDetails"] = result;
}
示例7: GetMultipleItemPEDDetails
public ItemPEDDetails GetMultipleItemPEDDetails(string xEle)
{
Database db = new Database();
string[,] str = new string[1, 2];
str[0, 0] = "@xml";
str[0, 1] = xEle;
try
{
string xmlResult = db.StoreprocedureExecuteQueryReturned("usp_GetMultipleItemPEDDetails", str);
var serializer = new XmlSerializer(typeof(ItemPEDDetails));
using (var reader = new StringReader(xmlResult))
{
var result = (ItemPEDDetails)serializer.Deserialize(reader);
return result;
}
}
catch (Exception)
{
return new ItemPEDDetails();
}
}
示例8: ValidateEmail
public string ValidateEmail(string email)
{
Database db = new Database();
string[,] str = new string[1, 2];
str[0, 0] = "@Email";
str[0, 1] = email;
string result = db.StoreprocedureExecuteQueryReturned("usp_GetUserDetails", str);
return result;
}
示例9: SaveMultipleProductOptimizedPrice
public int SaveMultipleProductOptimizedPrice(string xML, string optimizedValue)
{
Database db = new Database();
string[,] str = new string[2, 2];
str[0, 0] = "@XML";
str[0, 1] = xML;
str[1, 0] = "@OptimizedValue";
str[1, 1] = optimizedValue;
try
{
string Result = db.StoreprocedureExecuteQueryReturned("usp_SaveOptimizedPrice_MultipleProduct", str);
return Convert.ToInt32(Result);
}
catch (Exception)
{
return 0;
}
}
示例10: SaveSingleProductOptimizedPrice
public int SaveSingleProductOptimizedPrice(string product, string store, decimal price, string optimizedPrice)
{
Database db = new Database();
string[,] str = new string[4, 2];
str[0, 0] = "@Product";
str[0, 1] = product;
str[1, 0] = "@Store";
str[1, 1] = store;
str[2, 0] = "@Price";
str[2, 1] = price.ToString();
str[3, 0] = "@OptimizedPrice";
str[3, 1] = optimizedPrice;
try
{
string Result = db.StoreprocedureExecuteQueryReturned("usp_SaveOptimizedPrice_SingleProduct", str);
return Convert.ToInt32(Result);
}
catch (Exception)
{
return 0;
}
}