Example #1
0
        private void llblTim_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            frmTim frm = new frmTim(frmTim.Loai.NhaCungCap);

            frm.ShowDialog();
            txtMaNCC.Text = frm.LayMa();
        }
Example #2
0
        private void btnKhachCu_Click(object sender, EventArgs e)
        {
            if (bThemKH)
            {
                btnThem.Text = btnThem.Text == "Khách mới" ? "Huỷ" : "Khách mới";
                txtTenKH.Focus();
                txtTenKH.Text  = "";
                txtSoDT.Text   = "";
                txtDiaChi.Text = "";

                txtTenKH.ReadOnly  = bThemKH;
                txtSoDT.ReadOnly   = bThemKH;
                txtDiaChi.ReadOnly = bThemKH;

                bThemKH = !bThemKH;
            }

            frmTim frm = new frmTim(frmTim.Loai.KhachHang);

            frm.ShowDialog();
            if (frm.LayMa() != null)
            {
                strMaKH        = frm.LayMa();
                dtKhachHang    = _KhachHangBUS.LayBangKhachHang(strMaKH);
                txtTenKH.Text  = dtKhachHang.Rows[0]["TenKhachHang"].ToString();
                txtSoDT.Text   = dtKhachHang.Rows[0]["SoDT"].ToString();
                txtDiaChi.Text = dtKhachHang.Rows[0]["DiaChi"].ToString();
            }
        }
Example #3
0
        private void llblTim_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            frmTim frm = new frmTim(frmTim.Loai.KhachHang);

            frm.ShowDialog();
            txtMaKH.Text = frm.LayMa();
        }
Example #4
0
        private void btnNCCCu_Click(object sender, EventArgs e)
        {
            frmTim frm = new frmTim(frmTim.Loai.NhaCungCap);

            frm.ShowDialog();
            if (frm.LayMa() != null)
            {
                strMaNCC       = frm.LayMa();
                dtNhaCungCap   = _NhaCungCapBUS.LayBangNhaCungCapTheoMa(strMaNCC);
                txtTenNCC.Text = dtNhaCungCap.Rows[0]["TenNhaCungCap"].ToString();
                txtSoDT.Text   = dtNhaCungCap.Rows[0]["SoDT"].ToString();
                txtDiaChi.Text = dtNhaCungCap.Rows[0]["DiaChi"].ToString();
            }
        }
Example #5
0
        private void btnTimKH_Click(object sender, EventArgs e)
        {
            frmTim frm = new frmTim(frmTim.Loai.KhachHang);

            frm.ShowDialog();
            strMaKH = frm.LayMa();
            if (strMaKH != null)
            {
                DataTable dtKH = _KhachHangBUS.LayBangKhachHang(strMaKH);
                txtTenKH.Text  = dtKH.Rows[0]["TenKhachHang"].ToString();
                txtSoDT.Text   = dtKH.Rows[0]["SoDT"].ToString();
                txtDiaChi.Text = dtKH.Rows[0]["DiaChi"].ToString();
                strMaKH        = dtKH.Rows[0]["MaKhachHang"].ToString();
            }
        }