public int UpdateFileRecord(BLModel.File modelFile) { int ClaimNumberExists = 0; ClaimNumberExists = _fileRepository.GetAll(file => file.ClaimNumber == modelFile.ClaimNumber && file.FileID != modelFile.FileID).Count(); if (ClaimNumberExists == 0 || modelFile.DepartmentID == 5) { DLModel.ICRecordDetail objICRecordDetail = new DLModel.ICRecordDetail(); DLModel.File objFile = new DLModel.File(); objFile.FileID = modelFile.FileID; objFile.FirstName = modelFile.FirstName; objFile.LastName = modelFile.LastName; objFile.ClaimNumber = modelFile.ClaimNumber; objFile.InsurerId = modelFile.InsurerId; objFile.InsurerBranchId = modelFile.InsurerBranchId; objFile.EmployerId = modelFile.EmployerId; objFile.AdjusterId = modelFile.AdjusterId; objFile.IsLienClaimNumber = modelFile.IsLienClaimNumber; objFile.IsLienInsurerID = modelFile.IsLienInsurerID; objFile.IsLienInsurerBranchID = modelFile.IsLienInsurerBranchID; objFile.IsLienEmployerID = modelFile.IsLienEmployerID; objFile.IsLienAdjusterID = modelFile.IsLienAdjusterID; objFile.IsDeleted = modelFile.IsDeleted; objFile.DeletedBy = modelFile.DeletedBy; objFile.DeletedOn = modelFile.DeletedOn; objFile.Notes = modelFile.Notes; objFile.DepartmentID = modelFile.DepartmentID; _fileRepository.Update((DLModel.File) new DLModel.File().InjectFrom(modelFile)); if (modelFile.DepartmentID == 5) { objICRecordDetail.FileID = modelFile.FileID; objICRecordDetail.ICRecordDetailID = modelFile.ICRecordDetailID; objICRecordDetail.ICRecordDetailAddress = modelFile.ICRecordDetailAddress; objICRecordDetail.ICRecordDetailCity = modelFile.ICRecordDetailCity; objICRecordDetail.StateID = modelFile.StateID; objICRecordDetail.ICRecordDetailZip = modelFile.ICRecordDetailZip; objICRecordDetail.ICRecordDetailTaxID = modelFile.ICRecordDetailTaxID; var _ICRecordDetailID = _ICRepository.Update((DLModel.ICRecordDetail) new DLModel.ICRecordDetail().InjectFrom(objICRecordDetail)); } return(modelFile.FileID); } else { // Its means claim number already exists .... return(0); } }
public string UpdateFileCheckonClaimNo(DLModel.File modelFile) { return(_fileRepository.UpdateFileCheckonClaimNo((DLModel.File) new DLModel.File().InjectFrom(modelFile))); }
public int UpdateICFile(DLModel.File modelFile) { return(_fileRepository.UpdateICFile((DLModel.File) new DLModel.File().InjectFrom(modelFile))); }