Exemplo n.º 1
0
        private void m_cmd_dang_nhap_Click(object sender, EventArgs e)
        {
            try
            {
                this.Hide();
                f999_main f999 = new f999_main();
                f999.ShowDialog();
            }
            catch (Exception v_e)
            {
                MessageBox.Show("Đã xảy ra lỗi trong quá trình đăng nhập" + v_e);

            }
        }
Exemplo n.º 2
0
        private void m_cmd_dang_nhap_Click(object sender, EventArgs e)
        {
            try
            {
                US_DUNG_CHUNG v_us = new US_DUNG_CHUNG();
                DataSet v_ds = new DataSet();
                v_ds.Tables.Add(new DataTable());
                v_us.FillDatasetLogin(v_ds, m_txt_user.Text, User.GetMD5(m_txt_password.Text));
                if (v_ds.Tables[0].Rows.Count != 1)
                {
                    m_lab_eror.Text = "Tài khoản hoặc mật khẩu không đúng!";
                    return;
                }
                else
                {
                    User.id_nhom = (decimal)v_ds.Tables[0].Rows[0]["ID_NHOM"];
                    User.tai_khoan = v_ds.Tables[0].Rows[0]["TAI_KHOAN"].ToString();
                    User.mat_khau = v_ds.Tables[0].Rows[0]["MAT_KHAU"].ToString();
                    User.id_user =(decimal) v_ds.Tables[0].Rows[0]["ID"];
                    this.Hide();
                    f999_main f999 = new f999_main();
                    User.trang_thai_dang_nhap = true;
                    f999.ShowDialog();
                    if (User.trang_thai_dang_nhap == false)
                    {
                        this.Show();
                        m_txt_password.Text = "";
                    }
                }
            }

            catch
            {
                MessageBox.Show("Đã xảy ra lỗi trong hệ thống!");

            }
        }
Exemplo n.º 3
0
        private void m_cmd_dang_nhap_Click(object sender, EventArgs e)
        {
            try
            {
                US_DUNG_CHUNG v_us = new US_DUNG_CHUNG();
                DataSet       v_ds = new DataSet();
                v_ds.Tables.Add(new DataTable());
                v_us.FillDatasetLogin(v_ds, m_txt_user.Text, User.GetMD5(m_txt_password.Text));
                if (v_ds.Tables[0].Rows.Count != 1)
                {
                    m_lab_eror.Text = "Tài khoản hoặc mật khẩu không đúng!";
                    return;
                }
                else
                {
                    User.id_nhom   = (decimal)v_ds.Tables[0].Rows[0]["ID_NHOM"];
                    User.tai_khoan = v_ds.Tables[0].Rows[0]["TAI_KHOAN"].ToString();
                    User.mat_khau  = v_ds.Tables[0].Rows[0]["MAT_KHAU"].ToString();
                    User.id_user   = (decimal)v_ds.Tables[0].Rows[0]["ID"];
                    this.Hide();
                    f999_main f999 = new f999_main();
                    User.trang_thai_dang_nhap = true;
                    f999.ShowDialog();
                    if (User.trang_thai_dang_nhap == false)
                    {
                        this.Show();
                        m_txt_password.Text = "";
                    }
                }
            }

            catch
            {
                MessageBox.Show("Đã xảy ra lỗi trong hệ thống!");
            }
        }