本文整理汇总了C#中DBManager.CreateParameter方法的典型用法代码示例。如果您正苦于以下问题:C# DBManager.CreateParameter方法的具体用法?C# DBManager.CreateParameter怎么用?C# DBManager.CreateParameter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBManager
的用法示例。
在下文中一共展示了DBManager.CreateParameter方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InsertUser
public string InsertUser(string Username,string Mailid)
{
string Result = "a";
DBManager DbObj=new DBManager();
DbParameter[] dbparms = new DbParameter[2];
dbparms[0] = DbObj.CreateParameter("@Username", Username);
dbparms[1] = DbObj.CreateParameter("@UserMail", Mailid);
Result = DbObj.ExecuteScalar("InsertUser", dbparms, CommandType.StoredProcedure).ToString();
return Result;
}
示例2: Getuserbymail
public int Getuserbymail(string Mailid)
{
int Result;
DBManager DbObj = new DBManager();
DbParameter[] dbparms = new DbParameter[1];
dbparms[0] = DbObj.CreateParameter("@Mail", Mailid);
Result = Convert.ToInt32(DbObj.ExecuteScalar("GetUserbyMail", dbparms, CommandType.StoredProcedure));
return Result;
}
示例3: InsertTask
public string InsertTask(string Task, string Task_Descriprtion, string Priority, string Time, int UserId,string Status)
{
string Result = "";
DBManager DbObj = new DBManager();
DbParameter[] dbparms = new DbParameter[6];
dbparms[0] = DbObj.CreateParameter("@Task", Task);
dbparms[1] = DbObj.CreateParameter("@Task_Desc", Task_Descriprtion);
dbparms[2] = DbObj.CreateParameter("@Priority", Priority);
dbparms[3] = DbObj.CreateParameter("@Time", Time);
dbparms[4] = DbObj.CreateParameter("@userid", UserId);
dbparms[5] = DbObj.CreateParameter("@Status", Status);
Result = DbObj.ExecuteScalar("InsertTask", dbparms, CommandType.StoredProcedure).ToString();
return Result;
}
示例4: LoadTask
public List<WcfService1.ServiceModels.TaskCls> LoadTask(int UserId)
{
DataSet dset = new DataSet();
DataTable dt = new DataTable();
DBManager DbObj = new DBManager();
DbParameter[] dbparms = new DbParameter[1];
dbparms[0] = DbObj.CreateParameter("@Userid", UserId);
dt = DbObj.GetDataTabe("GetTask", dbparms, CommandType.StoredProcedure);
List<TaskCls> TaskList = new List<TaskCls>();
foreach (DataRow dr in dt.Rows)
{
TaskList.Add(new TaskCls
{
Task = (dr["Task"].ToString()),
Task_Des = (dr["Task_Des"].ToString()),
Priority = (dr["Priority"].ToString()),
CurrentTime = (dr["CurrentTime"].ToString()),
Active_Status = (dr["Active_Status"].ToString())
});
}
return TaskList;
}