Beispiel #1
0
        private void btn_Them_Click(object sender, EventArgs e)
        {
            if (KiemTraDuLieuNhap() == false)
            {
                return;
            }
            var kh = bll_loaikh.GetObjectFromTenLoaiKH(cbb_LoaiKH.Text.Trim());

            if (kh == null)
            {
                return;
            }

            if (khachhang.Insert(lb_MaKH.Text, txt_TenKH.Text, dtP_NgaySinh.Value, cbb_GioiTinh.Text, txt_DiaChi.Text, txt_SDT.Text, decimal.Parse(txt_CMND.Text), txt_Email.Text, kh.MaLoaiKH.Trim()))
            {
                Refresh_Grid();
                ResetThongTin();
                try { mainform.frm_banhang.IsReset = true; } catch {}
                try { mainform.frm_thongkebanhang.IsReset = true; } catch {}
            }
        }