Exemple #1
0
        private void LoadList()
        {
            EUser  c = new EUser();
            DataSet ds = c.GetListSpecific(txtUserName.Text,txtPassword.Text,Convert.ToInt32(cbxRole.SelectedValue));
            if (ds.Tables[0].Rows.Count > 0)
            {
                
                

                frmMain frm = new frmMain();
                
                frm.curruserid = Convert.ToInt32(ds.Tables[0].Rows[0]["UID"]);
                
                frm.currusername = txtUserName.Text;
                frm.pwd = txtPassword.Text;
                frm.role = cbxRole.Text;
                MISCurrentSettings.curruid = Convert.ToInt32(ds.Tables[0].Rows[0]["UID"]);
                frm.Show();
                this.Hide();
               
            }
            else
            {
               SpeechSynthesizer  ss = new SpeechSynthesizer();
               // MessageBox.Show("Sorry Your Login Information not Valid, Try Again");
                ttp.Show("Sorry Your Login Information not Valid, Please Try Again", txtPassword, 3000);
                ss.SpeakAsync("Sorry Your Login Information not Valid, Please Try Again");
               
            }

            
        }
Exemple #2
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     if (!IsValid())
     {
         return;
     }
     frmMain frmmain = new frmMain();
     frmmain.pwd = this.txtNewPwd.Text;
     frmmain.Close();
    
     EUser d = new EUser();
     d.ChangePwd(userid, txtNewPwd.Text);
     MessageBox.Show("Password Changed");
             
     this.Close();
     
 }