예제 #1
0
 private void button_Login_Click(object sender, EventArgs e)
 {
     _password = textBox_Password.Text;
     if ((_password.IndexOf(@"\") == 3) ||
         (_password.IndexOf(@"/") == 3))
     {
         string             _userID  = _password.Substring(0, 3);
         string             _role    = _password.Substring(4);
         List <string>      _emplStr = Utilities.DataBaseUtility.GetList("select * from employees where DocNum = " + _userID);
         Utilities.Employee _empl    = new Utilities.Employee(_emplStr[1]);
         ident.UserID      = _userID;
         ident.UserName    = _empl.LastName;
         ident.Role        = _empl.Role;
         ident.Role        = _empl.Role;
         ident.ActionLevel = Int32.Parse(_empl.AdmLevel);
         ident.Dept        = Int32.Parse(_empl.DeptID);
         List <string> _dept  = Utilities.DataBaseUtility.GetList("select * from departments");
         int           deptID = Int32.Parse(_empl.DeptID);
         if (deptID > 0)
         {
             textBox_Dept.Text = _dept[deptID + 1].Substring(4);
         }
         textBox_Role.Text   = _empl.Role;
         textBox_UserID.Text = _empl.LastName;
         base.SaveIdent(ident);
         base.DisplayIdent(ident);
     }
 }
예제 #2
0
 private void btnLogin_Click(object sender, EventArgs e)
 {
     _password = textBox_Password.Text;
        if (_password.IndexOf(@"\") == 3)
        {
            string _userID = _password.Substring(0, 3);
            //  string _role = _password.Substring(4);
            List<string> _emplStr = Utilities.DataBaseUtility.GetList("select * from employees where emplID = " + _userID);
            Utilities.Employee _empl = new Utilities.Employee(_emplStr[1]);
            ident.UserID = _userID;
            ident.UserName = _empl.LastName;
            ident.Role = _empl.Role;
            ident.ActionLevel = _empl.AdmLevel;
            ident.Dept = _empl.DeptID;
            List<string> _dept = Utilities.DataBaseUtility.GetList("select * from departments");
            textBox_Dept.Text = _dept[_empl.DeptID + 1].Substring(2);
            textBox_Role.Text = _empl.Role;
            textBox_UserID.Text = _empl.LastName;
        }
 }
예제 #3
0
 private void btnLogin_Click(object sender, EventArgs e)
 {
     _password = textBox_Password.Text;
     if (_password.IndexOf(@"\") == 3)
     {
         string _userID = _password.Substring(0, 3);
         //  string _role = _password.Substring(4);
         List <string>      _emplStr = Utilities.DataBaseUtility.GetList("select * from employees where emplID = " + _userID);
         Utilities.Employee _empl    = new Utilities.Employee(_emplStr[1]);
         ident.UserID      = _userID;
         ident.UserName    = _empl.LastName;
         ident.Role        = _empl.Role;
         ident.ActionLevel = _empl.AdmLevel;
         ident.Dept        = _empl.DeptID;
         List <string> _dept = Utilities.DataBaseUtility.GetList("select * from departments");
         textBox_Dept.Text   = _dept[_empl.DeptID + 1].Substring(2);
         textBox_Role.Text   = _empl.Role;
         textBox_UserID.Text = _empl.LastName;
     }
 }