Ejemplo n.º 1
0
 public Loginfrm(UserDetail userDetail)
 {
     InitializeComponent();
     //ExecutiveName = userDetail.UserId;
     UserDetail = userDetail;
     IsLogedIn = false;
 }
Ejemplo n.º 2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            Loginfrm frm = new Loginfrm(new UserDetail());
            frm.ShowDialog();

            if (!frm.IsLogedIn)
            {
                this.Close();
                return;
            }

            UserDetail = frm.UserDetail;
            _moduleList.AddRange(UserDetail.Modules.Split(','));
        }
Ejemplo n.º 3
0
        private void txtPassword_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode != Keys.Enter)
                return;

            if (string.IsNullOrEmpty(txtExecutiveName.Text))
            {
                MessageBox.Show("Please Enter Executive Name", "Message", MessageBoxButtons.OK);
                return;
            }

            if (UserDetail.Id <= 0)
            {
                var uniDb = new UniDBDataContext();
                UserDetail = uniDb.UserDetails.SingleOrDefault(x => x.UserId == txtExecutiveName.Text);
            }

            if (UserDetail == null)
            {
                MessageBox.Show("You have enter wrong User Name", "Message", MessageBoxButtons.OK);
                return;
            }

            if (UserDetail.Password.ToUpper() == txtPassword.Text.ToUpper())
            {
                IsLogedIn = true;
                this.Close();
            }
            else
            {
                MessageBox.Show("You have enter wrong password ", "Message", MessageBoxButtons.OK);
            }

            //if (txtPassword.Text.ToUpper() == ConfigurationSettings.AppSettings["password"].ToUpper())
            //{
            //    ExecutiveName = txtExecutiveName.Text;
            //    IsLogedIn = true;
            //    this.Close();
            //}
            //else
            //{
            //    MessageBox.Show("You have enter wrong password ", "Message", MessageBoxButtons.OK);
            //}
        }
Ejemplo n.º 4
0
 partial void DeleteUserDetail(UserDetail instance);
Ejemplo n.º 5
0
 partial void UpdateUserDetail(UserDetail instance);
Ejemplo n.º 6
0
 partial void InsertUserDetail(UserDetail instance);