public void AddFile() { BLModel.FirstName = "Test"; BLModel.LastName = "Test"; BLModel.ClaimNumber = "Test1"; BLModel.IsLienClaimNumber = false; BLModel.InsurerId = 1; BLModel.InsurerBranchId = 2; BLModel.EmployerId = 3; BLModel.AdjusterId = 4; BLModel.IsLienInsurerID = true; BLModel.IsLienInsurerBranchID = true; BLModel.IsLienEmployerID = false; BLModel.IsLienAdjusterID = false; BLModel.IsDeleted = false; BLModel.DeletedBy = 0; BLModel.DeletedOn = System.DateTime.Now; BLModel.Notes = ""; BLModel.DepartmentID = 5; BLModel.FileID = 0; BLModel.ICRecordDetailAddress = "ABC"; BLModel.ICRecordDetailCity = "ASD"; BLModel.StateID = 1; BLModel.ICRecordDetailZip = "234"; BLModel.ICRecordDetailTaxID = "4567"; int patientid = _IFileImplBL.AddFileRecord(BLModel); Assert.IsTrue(true, "Unable to find"); }
public ActionResult AddFile(LMGEDIApp.Domain.Models.FileModel.File objFile) { try { if (objFile.FileID == 0) { objFile.DeletedOn = null; int i = _fileBL.AddFileRecord(Mapper.Map <LMGEDI.Core.BL.Model.File>(objFile)); if (i > 0) { return(Json(i, GlobalConst.ContentTypes.TextHtml)); } else { return(Json(GlobalConst.alertMessages.DuplicateClaimNo, GlobalConst.ContentTypes.TextHtml)); } } else { if (objFile.DepartmentID == 5) { var fileid = _fileBL.UpdateFileRecord(Mapper.Map <LMGEDI.Core.BL.Model.File>(objFile)); return(Json(GlobalConst.alertMessages.UpdatedSuccessfully, GlobalConst.ContentTypes.TextHtml)); } else { objFile.DeletedBy = Convert.ToInt32(Request.Cookies[GlobalConst.SessionKeys.userDetailMgmt].Values[GlobalConst.SessionKeys.userID]); objFile.DeletedOn = System.DateTime.Now; if (_fileBL.UpdateFileCheckonClaimNo(Mapper.Map <LMGEDI.Core.Data.Model.File>(objFile)) != GlobalConst.ConstantChar.Zero) { return(Json(GlobalConst.alertMessages.UpdatedSuccessfully, GlobalConst.ContentTypes.TextHtml)); } else { return(Json(GlobalConst.alertMessages.DuplicateInvoice, GlobalConst.ContentTypes.TextHtml)); } } } } catch (Exception ex) { _arCommonService.CreateErrorLog(ex.Message, ex.StackTrace); return(View()); } }