public ActionResult EditInvestigationReport(lmsInvestigationReport objlmsInvestigationReport)
        {
            var saveInvestigationReportDetails = _objIInvoice.SaveInvestigationReport(objlmsInvestigationReport);

            //ViewBag.Message = viewMessage;
            return(RedirectToAction("ViewInvestigationReport", new { ReportId = saveInvestigationReportDetails, viewMessage = "InvestigationReport Details Saved Successfully" }));
        }
        public int SaveInvestigationReport(lmsInvestigationReport objlmsInvestigationReport)
        {
            var resultId = 0;

            try
            {
                if (objlmsInvestigationReport.REPORTID > 0)
                {
                    _objLabManagementEntities.lmsInvestigationReports.Attach(objlmsInvestigationReport);
                    _objLabManagementEntities.Entry(objlmsInvestigationReport).State = EntityState.Modified;
                    _objLabManagementEntities.SaveChanges();
                    return(objlmsInvestigationReport.REPORTID);
                }
                _objLabManagementEntities.lmsInvestigationReports.Add(objlmsInvestigationReport);
                _objLabManagementEntities.SaveChanges();
                resultId = _objLabManagementEntities.lmsInvestigationReports.ToList().LastOrDefault().REPORTID;
            }
            catch (Exception ex)
            {
                _objIAppLogger.LogError(ex);
            }

            return(resultId);
        }