Esempio n. 1
0
 public string NewTask()
 {
     Sql2KDataAccess access = new Sql2KDataAccess();
     Hashtable hT = new Hashtable();
     new DataSet();
     hT.Add("@UserName", User.UserName);
     return access.RunProcedureNoRecord("@TaskId", SqlDbType.VarChar, hT, "P_NewTask");
 }
Esempio n. 2
0
 public static string CreateWorkPlanID()
 {
     Hashtable hT = new Hashtable();
     Sql2KDataAccess access = new Sql2KDataAccess();
     m_IntWorkPlanID = Convert.ToInt32(access.RunProcedureNoRecord("@NewWorkPlanID", SqlDbType.Char, hT, "P_CreateWorkPlanID").Trim());
     m_StrWorkPlanID = "W" + DateTime.Now.ToString("yyyyMMdd") + m_IntWorkPlanID.ToString("D3");
     return m_StrWorkPlanID;
 }
Esempio n. 3
0
 public int GetBoxCapability()
 {
     Sql2KDataAccess access = new Sql2KDataAccess();
     new DataSet();
     Hashtable hT = new Hashtable();
     hT.Add("@SetKey", "MbBoxCapability");
     hT.Add("@UserName", User.UserName);
     return int.Parse(access.RunProcedureNoRecord("@SetValue", SqlDbType.VarChar, hT, "P_GetSet"));
 }
Esempio n. 4
0
 public static string GetSendPrinter()
 {
     Sql2KDataAccess access = new Sql2KDataAccess();
     new DataSet();
     Hashtable hT = new Hashtable();
     hT.Add("@SetKey", "SendPrinter");
     hT.Add("@UserName", User.UserName);
     return access.RunProcedureNoRecord("@SetValue", SqlDbType.VarChar, hT, "P_GetSet");
 }
Esempio n. 5
0
 public string NewTask(string MbType, long MbAmount, string WProcedure)
 {
     Sql2KDataAccess access = new Sql2KDataAccess();
     Hashtable hT = new Hashtable();
     hT.Add("@UserName", User.UserName);
     hT.Add("@MbType", MbType);
     hT.Add("@MbAmount", MbAmount);
     hT.Add("@WProcedure", WProcedure);
     return access.RunProcedureNoRecord("@MbTaskId", SqlDbType.VarChar, hT, "P_NewMbTask");
 }
Esempio n. 6
0
 public string GetPlanRemark(string PlanId)
 {
     Sql2KDataAccess access = new Sql2KDataAccess();
     Hashtable hT = new Hashtable();
     hT.Add("@PlanId", PlanId);
     return access.RunProcedureNoRecord("@Remark", SqlDbType.VarChar, hT, "P_GetPlanRemark");
 }
Esempio n. 7
0
 public int UserLogin(string UserName, string Pwd)
 {
     Sql2KDataAccess access = new Sql2KDataAccess();
     Hashtable hT = new Hashtable();
     hT.Add("@UserName", UserName);
     hT.Add("@Pwd", this.GetPwdHashCode(Pwd));
     string s = access.RunProcedureNoRecord("result", SqlDbType.VarChar, hT, "P_UserLogin");
     if (s == "1")
     {
         m_UserName = UserName.Trim();
     }
     return int.Parse(s);
 }
Esempio n. 8
0
 public bool AddUser(string UserName, string Pwd, string TrueName, string Duty, string BarCode)
 {
     Sql2KDataAccess access = new Sql2KDataAccess();
     Hashtable hT = new Hashtable();
     hT.Add("@UserName", UserName);
     hT.Add("@Pwd", this.GetPwdHashCode(Pwd));
     hT.Add("@truename", TrueName);
     hT.Add("@duty", Duty);
     hT.Add("@BarCode", BarCode);
     if (!(access.RunProcedureNoRecord("@IsSuccess", SqlDbType.Int, hT, "P_AddUser") == "0"))
     {
         return false;
     }
     return true;
 }
Esempio n. 9
0
 public static bool IsHaveAuthority(string AuthorityName)
 {
     Sql2KDataAccess access = new Sql2KDataAccess();
     Hashtable hT = new Hashtable();
     hT.Add("@UserName ", m_UserName);
     hT.Add("@AutorityName ", AuthorityName);
     if (!(access.RunProcedureNoRecord("@IsHave", SqlDbType.Int, hT, "P_CheckAuthority") == "1"))
     {
         return false;
     }
     return true;
 }