示例#1
0
文件: frmLogin.cs 项目: kinpauln/SMS
 private void btnLogin_Click(object sender, EventArgs e)
 {
     int P_int_returnValue = doperate.UserLogin(cboxUName.Text.Trim(), txtPwd.Text.Trim());
     if (P_int_returnValue == 100)
     {
         M_str_name = cboxUName.Text;
         M_str_pwd = txtPwd.Text.Trim();
         frmMain fmain = new frmMain();
         this.Hide();
         fmain.Show();
     }
     if (P_int_returnValue == -100)
     {
         MessageBox.Show("�û������������", "��ʾ", MessageBoxButtons.OK, MessageBoxIcon.Information);
         txtPwd.Text = "";
         cboxUName.Focus();
     }
 }
示例#2
0
文件: frmMain.cs 项目: kinpauln/SMS
 private void frmMain_FormClosed(object sender, FormClosedEventArgs e)
 {
     if (MessageBox.Show("�����Ҫ�˳���ϵͳ��", "��ʾ", MessageBoxButtons.OKCancel, MessageBoxIcon.Information) == DialogResult.OK)
     {
         Application.Exit();
     }
     else
     {
         frmMain fmain = new frmMain();
         fmain.Show();
     }
 }