public bool LaiSuat(DatabaseConstant.Action Action, ref DC_LSUAT objLaiSuat, ref List <DC_LSUAT_CTIET> lstLsuatCtiet, ref List <ClientResponseDetail> listClientResponseDetail) { // Kiểm tra kết nối, server, service trước khi request Common.Utilities.IsRequestAllow(ApplicationConstant.SystemService.LaiSuatService.layGiaTri()); // Khởi tạo và gán giá trị cho request LaiSuatRequest request = Common.Utilities.PrepareRequest(new LaiSuatRequest()); request.Function = DatabaseConstant.Function.DC_LAI_SUAT_CT; request.Action = Action; request.objLsuat = objLaiSuat; request.lstLsuatCtiet = lstLsuatCtiet.ToArray(); LaiSuatResponse response = Client.LaiSuat(request); // Kiểm tra kết quả trả về Common.Utilities.ValidResponse(request, response); if (response != null && response.ResponseStatus == ApplicationConstant.ResponseStatus.THANH_CONG) { objLaiSuat = response.objLsuat; lstLsuatCtiet = response.lstLsuatCtiet.ToList(); return(true); } else { listClientResponseDetail = Common.Utilities.convertToClientResponseDetail(response); return(false); } }
public DC_LSUAT LayThongTinLaiSuat(int id) { // Kiểm tra kết nối, server, service trước khi request Common.Utilities.IsRequestAllow(ApplicationConstant.SystemService.TruyVanService.layGiaTri()); // Khởi tạo và gán các giá trị cho request LaiSuatServiceRef.LaiSuatRequest request = Common.Utilities.PrepareRequest(new LaiSuatServiceRef.LaiSuatRequest()); LaiSuatServiceRef.LaiSuatResponse response = new LaiSuatServiceRef.LaiSuatResponse(); DC_LSUAT obj = new DC_LSUAT(); obj.ID = id; request.objLsuat = obj; // Lấy kết quả trả về response = Client.GetThongTinLaiSuat(request); // Kiểm tra kết quả trả về Common.Utilities.ValidResponse(request, response); return(response.objLsuat); }