Ejemplo n.º 1
0
        private void pictureBox2_Click(object sender, EventArgs e)  //登录
        {
            if (txtUserId.Text.Trim().Equals(string.Empty) || txtPwd.Text.Trim().Equals(string.Empty))
            {
                MessageBox.Show("请输入完整的信息!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                try
                {
                    //*********************************************************************************************************************************
                    //          用户名控件名:txtUserId                                                  密码控件名:txtPwd
                    //*********************************************************************************************************************************

                    string      id  = txtUserId.Text;
                    string      pwd = txtPwd.Text;
                    ws.LoginTag lt  = con.login(id, pwd);
                    if (lt == null)
                    {
                        MessageBox.Show("登录失败!");
                        return;
                    }
                    MainForm frm = new MainForm(con, cb);
                    frm.getguid(lt, id);
                    //frm.load();
                    frm.Show();
                    this.Hide();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Ejemplo n.º 2
0
 public void getguid(ws.LoginTag lt, string id)
 {
     this.lt = lt;
     this.id = id;
 }//个人信息加载