private KhachHangDto createKhachHangDto(FormSearchCustomerObj obj) { KhachHangDto dto = new KhachHangDto(); dto.idKhachHang = obj.idKhachHang; dto.tenKhachHang = obj.tenKhachHang; dto.sales = obj.sales; return(dto); }
public LogicResult searchCustomerLogic(FormSearchCustomerObj obj) { KhachHangDto khDto = createKhachHangDto(obj); KhachHangDao khDao = new KhachHangDao(); obj.listKhachHangs = khDao.getListKhachHang(khDto); String msg = ""; return(new LogicResult(Contanst.MSG_INFO, msg, obj)); }
public LogicResult deleteCustomerLogic(FormSearchCustomerObj obj) { KhachHangDao khDao = new KhachHangDao(); LienHeDao lienHeDao = new LienHeDao(); khDao.deleteKhachHang(obj.idKhachHang); List <LienHeDto> listLienHeOld = lienHeDao.getListLienHe(obj.idKhachHang); if (listLienHeOld.Count > 0) { lienHeDao.delete(obj.idKhachHang); } return(new LogicResult(Contanst.MSG_INFO, AppUtils.getAppConfig("MSGINFO005"), null)); }