コード例 #1
0
        private KhachHangDto createKhachHangDto(FormSearchCustomerObj obj)
        {
            KhachHangDto dto = new KhachHangDto();

            dto.idKhachHang  = obj.idKhachHang;
            dto.tenKhachHang = obj.tenKhachHang;
            dto.sales        = obj.sales;
            return(dto);
        }
コード例 #2
0
        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));
        }
コード例 #3
0
        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));
        }