Ejemplo n.º 1
0
        private void LuuThongTinKhachHang()
        {
            DBKhachHang dbKH = new DBKhachHang();
            DateTime?   dt   = null;

            maKH = dbKH.SetNewPrimaryKey();
            dbKH.InsertCustomer(maKH, tenKH, dt, "", "", "", "3");
        }
        private void btnThem_Click(object sender, EventArgs e)
        {
            isInsert = true;

            txtSDT.ResetText();
            txtDiaChi.ResetText();
            txtTenKH.ResetText();

            grThongTinKhachHang.Enabled = true;
            btnHuy.Enabled     = true;
            btnLuu.Enabled     = true;
            btnThem.Enabled    = false;
            btnSua.Enabled     = false;
            this.ActiveControl = txtTenKH;

            txtMaKH.Text = dbKH.SetNewPrimaryKey();
        }