public bool CapNhatKhachHang(ref string err, KhachHangO kh)/* int SiOrLe, string MaKhachHang, string MaKhuVuc, * string TenKhachHang, string DiaChi, string MaSoThue, string Fax, string SoDienThoai, string SoDiDong, * string Email, string Website, string TaiKhoan, string NganHang, double GioiHanNo, double NoHienTai, float ChietKhau, * string NguoiLienHe, string ThongTinKhac)*/ { return(conn.MyExecuteNonQuery("proSuaKhachHang", CommandType.StoredProcedure, ref err, new SqlParameter("@SiOrLe", kh.SiOrLe), new SqlParameter("@MaKhachHang", kh.MaKhachHang), new SqlParameter("@MaKhuVuc", kh.MaKhuVuc), new SqlParameter("@TenKhachHang", kh.TenKhachHang), new SqlParameter("@DiaChi", kh.DiaChi), new SqlParameter("@MaSoThue", kh.MaSoThue), new SqlParameter("@Fax", kh.Fax), new SqlParameter("@SoDienThoai", kh.SoDienThoai), new SqlParameter("@SoDiDong", kh.SoDiDong), new SqlParameter("@Email", kh.Email), new SqlParameter("@Website", kh.Website), new SqlParameter("@TaiKhoan", kh.TaiKhoan), new SqlParameter("@NganHang", kh.NganHang), new SqlParameter("@GioiHanNo", kh.GioiHanNo), new SqlParameter("@NoHienTai", kh.NoHienTai), new SqlParameter("@ChietKhau", kh.ChietKhau), new SqlParameter("@NguoiLienHe", kh.NguoiLienHe), new SqlParameter("@ThongTinKhac", kh.ThongTinKhac), new SqlParameter("@ConQuanLy", kh.ConQuanLy) )); }
private void lueKhachHang_EditValueChanged(object sender, EventArgs e) { KH.MaKhachHang = lueKhachHang.EditValue.ToString(); KH = khachHangBUS.getOneKhachHang(KH); txtTenKhachHang.Text = KH.TenKhachHang; txtDiaChi.Text = KH.DiaChi; txtSoDienThoai.Text = KH.SoDienThoai; }
public FormKhachHang(int themOrSua, KhachHangO kh) { InitializeComponent(); this.themOrSua = themOrSua; khachHangBUS = new KhachHangBUS(); khuVucBUS = new KhuVucBUS(); KH = kh; // load lookupEdit khu vuc lueKhuVuc.Properties.DataSource = khuVucBUS.getAllKhuVuc(); lueKhuVuc.Properties.DisplayMember = "TenKhuVuc"; lueKhuVuc.Properties.ValueMember = "MaKhuVuc"; }
public UCLichSuTraHang() { InitializeComponent(); ucth = new UCTraHang2(); KH = new KhachHangO(); TH = new TraHangO(); CTTH = new ChiTietTraHangO(); TK = new TonKhoO(); traHangBUS = new TraHangBUS(); khachHangBUS = new KhachHangBUS(); chiTietPhieuTraHangBUS = new ChiTietPhieuTraHangBUS(); tonKhoBUS = new TonKhoBUS(); }
public KhachHangO getOneKhachHang(KhachHangO kh) { DataTable dt = new DataTable(); dt = khachHangDAO.GetAllKhachHang(); DataRow[] result = dt.Select("MaKhachHang= '" + kh.MaKhachHang + "'"); DataRow row = result[0]; KH.MaKhachHang = row["MaKhachHang"].ToString(); KH.TenKhachHang = row["TenKhachHang"].ToString(); KH.SoDienThoai = row["SoDienThoai"].ToString(); KH.DiaChi = row["DiaChi"].ToString(); return(KH); }
void initObjectBUS() { TH = new TraHangO(); KH = new KhachHangO(); HH = new HangHoaO(); DV = new DonViO(); CTTH = new ChiTietTraHangO(); TK = new TonKhoO(); traHangBUS = new TraHangBUS(); khachHangBUS = new KhachHangBUS(); nhanVienBUS = new NhanVienBUS(); khoBUS = new KhoBUS(); hangHoaBUS = new HangHoaBUS(); donViBUS = new DonViBUS(); tonKhoBUS = new TonKhoBUS(); chiTietPhieuTraHangBUS = new ChiTietPhieuTraHangBUS(); kieuThanhToanBUS = new KieuThanhToanBUS(); hinhThucThanhToanBUS = new HinhThucThanhToanBUS(); }
public bool XoaNhaCungCap(ref string err, KhachHangO kh) { return(conn.MyExecuteNonQuery("proXoaNhaCungCap", CommandType.StoredProcedure, ref err, new SqlParameter("@MaKhachHang", kh.MaKhachHang))); }
public UCKhachHang() { InitializeComponent(); khachHangBUS = new KhachHangBUS(); kh = new KhachHangO(); }
public bool XoaKhachHangBUS(ref string err, KhachHangO kh) { return(khachHangDAO.XoaKhachHang(ref err, kh)); }
public bool CapNhatKhachHangBUS(ref string err, KhachHangO kh) { return(khachHangDAO.CapNhatKhachHang(ref err, kh)); }
public KhachHangBUS() { khachHangDAO = new KhachHangDAO(); KH = new KhachHangO(); }