public Response <DriverDetailVM> SaveDriver(DriverDetailVM DriverObj, int userID, string userIP) { Response <DriverDetailVM> response = new Response <DriverDetailVM>(); DriverDetailVM DriverDetail = new DriverDetailVM(); try { DriverDetail = PLRDAO.SaveDriver(DriverObj, userID, userIP); if (DriverDetail != null) { response.Status = ResultStatus.Success; response.Message = "Driver Detail has been Saved"; response.Data = DriverDetail; } } catch (Exception ex) { LoggerService.LogException(ex); response.Status = ResultStatus.Error; response.Message = "Error"; response.Data = DriverDetail; } return(response); }
public Response <PoliceDetailVM> SavePolice(PoliceDetailVM PoliceObj, int userID, string userIP) { Response <PoliceDetailVM> response = new Response <PoliceDetailVM>(); PoliceDetailVM PoliceDetail = new PoliceDetailVM(); try { PoliceDetail = PLRDAO.SavePoliceDetail(PoliceObj, userID, userIP, (int)PartyType.ExternalSurveyor, (int)PartyType.InternalSurveyor, true); if (PoliceDetail != null) { response.Status = ResultStatus.Success; response.Message = "Police Detail has been Saved"; response.Data = PoliceDetail; } } catch (Exception ex) { LoggerService.LogException(ex); response.Status = ResultStatus.Error; response.Message = "Error"; response.Data = PoliceDetail; } return(response); }
public Response <List <Dropdown> > GetPLRTypeByClaimId(PLRVM plrVM) { Response <List <Dropdown> > response = new Response <List <Dropdown> >(); List <Dropdown> dropDownList = new List <Dropdown>(); try { int claimId = Convert.ToInt32(plrVM.ClaimId); dropDownList = PLRDAO.GetPLRTypeByClaimId(claimId); response.Status = ResultStatus.Success; response.Message = "Success"; response.Data = dropDownList; } catch (Exception ex) { LoggerService.LogException(ex); response.Status = ResultStatus.Error; response.Message = "Error"; response.Data = dropDownList; } return(response); }
public Response <SurveyorDetailVM> SaveSurveyDetail(SurveyorDetailVM surveyor) { Response <SurveyorDetailVM> response = new Response <SurveyorDetailVM>(); SurveyorDetailVM surveyorObj = null; try { surveyorObj = PLRDAO.SaveSurveyDetail(surveyor); if (surveyorObj != null) { response.Status = ResultStatus.Success; response.Message = "Survey Detail has been Saved"; response.Data = surveyorObj; } } catch (Exception ex) { LoggerService.LogException(ex); response.Status = ResultStatus.Error; response.Message = "Error"; response.Data = surveyorObj; } return(response); }
public List <BillingCases> GetBillCasesByVendor(int userId) { List <BillingCases> response = new List <BillingCases>(); try { response = BillingDao.GetBillCasesByVendor(userId); } catch (Exception ex) { LoggerService.LogException(ex); } return(response); }
public List <PLRFinalReport> GetPLRFinalReport(string PLRType, int userId) { List <PLRFinalReport> response = new List <PLRFinalReport>(); try { int dispositionId = (int)(PLRDisposition)Enum.Parse(typeof(PLRDisposition), PLRType); response = PLRDAO.GetPLRFinalReport(userId, Status.Active, dispositionId); } catch (Exception ex) { LoggerService.LogException(ex); } return(response); }
public List <PLRCases> GetPLRCases(string PLRType, int userId) { List <PLRCases> response = new List <PLRCases>(); try { int dispositionId = PLRType == "RejectedPLR" ? (int)PLRDisposition.RPLR : (int)(PLRDisposition)Enum.Parse(typeof(PLRDisposition), PLRType); response = PLRDAO.GetPLRCasesBySurveyor(userId, Status.Active, dispositionId); } catch (Exception ex) { LoggerService.LogException(ex); } return(response); }
public Response <List <UploadImageStatus> > SaveAttachment(string folderName, string claimId, int?userId, HttpRequestBase Request, FtpCredentials ftpCredentials) { string ftpResult = string.Empty; string pathToCreate = $"{claimId}/{folderName}"; List <UploadImageStatus> lstimgstatus = new List <UploadImageStatus>(); Response <List <UploadImageStatus> > response = new Response <List <UploadImageStatus> >(); PLRAttachmentVM PLRAttachmentVM = new PLRAttachmentVM { FtpUrl = ftpCredentials.FTPAddress, PathToCreate = pathToCreate, FtpUsername = ftpCredentials.FTPUserName, FtpPassword = ftpCredentials.FTPPassword, ClaimId = claimId, FolderName = folderName, Status = folderName.Substring(0, 1).ToUpper(), UserId = userId.ToString(), Request = Request }; try { ftpResult = FtpIOExtensions.CreateFtpDirectory(PLRAttachmentVM); if (string.IsNullOrEmpty(ftpResult)) { ftpResult = FtpIOExtensions.UploadFileToFtp(PLRAttachmentVM); lstimgstatus = PLRDAO.UploadedImagesDetail(PLRAttachmentVM.ClaimId); response.Status = ResultStatus.Success; response.Message = "Success"; response.Data = lstimgstatus; } } catch (Exception ex) { LoggerService.LogException(ex); response.Status = ResultStatus.Error; response.Message = "Error"; response.Data = lstimgstatus; } return(response); }