Ejemplo n.º 1
0
        public static string CheckAccount(string accountId, string strPassword)
        {
            string   str;
            SYS_USER sYSUSER  = new SYS_USER();
            string   userName = sYSUSER.Get_UserName(accountId);

            if (!(userName == "OK"))
            {
                userName = "******";
            }
            else if (!(sYSUSER.Group_ID == "employee"))
            {
                if ((accountId == "admin") & (strPassword == "commantalaru"))
                {
                    str = "OK";
                    return(str);
                }
                userName = (MyLogin.CreatePassword(accountId, strPassword).CompareTo(sYSUSER.Password) != 0 ? "Tài khoản và mật khẩu không đúng!" : "OK");
            }
            else
            {
                str = "Tài khoản của bạn không được phép truy cập vào phần mềm!";
                return(str);
            }
            str = userName;
            return(str);
        }
Ejemplo n.º 2
0
 public string Update(string UserID, string UserName, string Password, string Group_ID, string Email, string Description, string PartID, int Management, string SubsidiaryCode, string BranchCode, string DepartmentCode, string GroupCode, string EmployeeCode, bool Active)
 {
     MyLogin.CreatePassword(UserName, Password);
     string[] strArrays  = new string[] { "@UserID", "@UserName", "@Password", "@Group_ID", "@Email", "@Description", "@PartID", "@Management", "@SubsidiaryCode", "@BranchCode", "@DepartmentCode", "@GroupCode", "@EmployeeCode", "@Active" };
     string[] strArrays1 = strArrays;
     object[] userID     = new object[] { UserID, UserName, Password, Group_ID, Email, Description, PartID, Management, SubsidiaryCode, BranchCode, DepartmentCode, GroupCode, EmployeeCode, Active };
     return((new SqlHelper()).ExecuteNonQuery("SYS_USER_Update", strArrays1, userID));
 }
Ejemplo n.º 3
0
        public SYS_USER(string UserID, string UserName, string Password, string Group_ID, string Email, string Description, string PartID, int Management, string SubsidiaryCode, string BranchCode, string DepartmentCode, string GroupCode, string EmployeeCode, bool Active)
        {
            string str = MyLogin.CreatePassword(UserName, Password);

            this.m_UserID         = UserID;
            this.m_UserName       = UserName;
            this.m_Password       = str;
            this.m_Group_ID       = Group_ID;
            this.m_Email          = Email;
            this.m_Description    = Description;
            this.m_PartID         = PartID;
            this.m_Management     = Management;
            this.m_SubsidiaryCode = SubsidiaryCode;
            this.m_BranchCode     = BranchCode;
            this.m_DepartmentCode = DepartmentCode;
            this.m_GroupCode      = GroupCode;
            this.m_EmployeeCode   = EmployeeCode;
            this.m_Active         = Active;
        }