Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            DA.tbKHACHHANG model = new DA.tbKHACHHANG();
            model.ho     = txtHoTen.Text;
            model.ten    = txtNamSinh.Text;
            model.sdt    = txtSDT.Text;
            model.diachi = txtDiaChi.Text;
            BL.bl_KhachHang bl = new BL.bl_KhachHang();
            Common.Constants.id_KhachHang = bl.ThemKhachHang(model);
            DA.tbLUACHONTHIETKE luachon = new DA.tbLUACHONTHIETKE();
            luachon.id_khachhang = Common.Constants.id_KhachHang;
            luachon.id_thietke   = Common.Constants.id;
            luachon.ngay         = DateTime.Now;
            bl.LuaChonThietKe(luachon);
            frm_ThongTinChiTiet frm = new frm_ThongTinChiTiet();

            frm.Show();
            this.Close();
        }
Ejemplo n.º 2
0
 public void LuaChonThietKe(DA.tbLUACHONTHIETKE model)
 {
     db.tbLUACHONTHIETKEs.Add(model);
     db.SaveChanges();
 }