public JsonResult GetNoticeBoardIsRead() { DataControl.CurrentInfo objCur = new DataControl.CurrentInfo(); string companyCode = objCur.GetCompanyCode(); string userCode = objCur.GetUserCode(); try { StringBuilder sbTableContent = new StringBuilder(); DataControl.HiDoctor_ActivityFactoryClasses.BL_NoticeBoard _objBlActivity = new DataControl.HiDoctor_ActivityFactoryClasses.BL_NoticeBoard(); DataControl.CurrentInfo _objCurrentInfo = new DataControl.CurrentInfo(); IEnumerable <MVCModels.NoticeBoardContentModel> lstdata = null; lstdata = _objBlActivity.GetNoticeBoarddetail(companyCode, userCode); return(Json(lstdata, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { Dictionary <string, string> dicContext = new Dictionary <string, string>(); dicContext.Add("Filter:CompanyCode", companyCode); dicContext.Add("Filter:UserCode", userCode); DataControl.Impl.ExceptionHandler.WriteLog(ex, dicContext); throw new Exception("Sorry an error occurred. Please try again later"); throw ex; } }
public string GetAllNoticesReadPopup(string mesgCode) { DataControl.CurrentInfo objCur = new DataControl.CurrentInfo(); string companyCode = objCur.GetCompanyCode(); string userCode = objCur.GetUserCode(); try { StringBuilder sbTableContent = new StringBuilder(); DataControl.HiDoctor_ActivityFactoryClasses.BL_NoticeBoard _objBlActivity = new DataControl.HiDoctor_ActivityFactoryClasses.BL_NoticeBoard(); DataControl.CurrentInfo _objCurrentInfo = new DataControl.CurrentInfo(); IEnumerable <MVCModels.NoticeBoardContentModel> lstdata = null; lstdata = _objBlActivity.GetNoticeBoardPopup(companyCode, mesgCode, userCode); sbTableContent.Append("</div>"); sbTableContent.Append("<table id='NoticeBoardpopup' class='table table-striped' style='width:100%;'>"); DataControl.Repository.AzureBlobUpload objAzureUpload = new DataControl.Repository.AzureBlobUpload(); DataControl.Abstraction.IFileProvider objPathProv = new DataControl.Impl.FileSystemProvider(); string accKey = objPathProv.GetConfigValue("NBFILES"); // string blobURL = objAzureUpload.AzureblockDownload(postedFile.FileName, accKey, containerName); foreach (var item in lstdata) { sbTableContent.Append("<thead class='active'>"); sbTableContent.Append("<tr><td>NoticeBoardInfo</td><td></td></tr>"); sbTableContent.Append("</thead>"); sbTableContent.Append("<tr><td>Author</td>"); sbTableContent.Append("<td>" + item.Employee_Name + "(" + item.Author + ")</td></tr>"); sbTableContent.Append("<tr><td>Title</td>"); sbTableContent.Append("<td>" + item.Title + "</td></tr>"); sbTableContent.Append("<tr><td>Message</td>"); sbTableContent.Append("<td>" + item.Message + "</td></tr>"); sbTableContent.Append("<tr><td>Hyperlink</td>"); sbTableContent.Append("<td class='td-a'><a style='text-decoration:underline;cursor:pointer;' target='_blank' href='" + item.Hyperlink + "'>" + item.Hyperlink + "</a></td></tr>"); sbTableContent.Append("<tr><td>Attachments</td>"); string blobURL = accKey + Session["Comp_Code"].ToString().ToLower() + "/" + HttpUtility.UrlEncode(item.FilePath).ToString(); if (item.FilePath != "") { sbTableContent.Append("<td <div id='dvURL' class='div-alert'>Click on link to download : <a href=" + blobURL + " target='_blank' >" + item.FilePath + "</a></div></td></tr>"); } else { sbTableContent.Append("<td></td></tr>"); } } return(sbTableContent.ToString()); } catch (Exception ex) { Dictionary <string, string> dicContext = new Dictionary <string, string>(); dicContext.Add("Filter:CompanyCode", companyCode); dicContext.Add("Filter:UserCode", userCode); DataControl.Impl.ExceptionHandler.WriteLog(ex, dicContext); throw new Exception("Sorry an error occurred. Please try again later"); throw ex; } }
public string GetAllNoticeMandatoryDetail() { DataControl.CurrentInfo objCur = new DataControl.CurrentInfo(); string companyCode = objCur.GetCompanyCode(); string userCode = objCur.GetUserCode(); try { StringBuilder sbTableContent = new StringBuilder(); DataControl.HiDoctor_ActivityFactoryClasses.BL_NoticeBoard _objBlActivity = new DataControl.HiDoctor_ActivityFactoryClasses.BL_NoticeBoard(); DataControl.CurrentInfo _objCurrentInfo = new DataControl.CurrentInfo(); IEnumerable <MVCModels.NoticeBoardContentModel> lstdata = null; lstdata = _objBlActivity.GetNoticeBoarddetail(companyCode, userCode); sbTableContent.Append("</div>"); sbTableContent.Append("<table id='NoticeBoardRead' class='table table-striped' style='width:100% !important;padding:4px !important;'>"); sbTableContent.Append("<thead class='active'>"); sbTableContent.Append("<tr><td>Title</td>"); sbTableContent.Append("<td>ActiveFrom</td>"); sbTableContent.Append("<td>ActiveTo</td>"); sbTableContent.Append("<td>Author</td>"); sbTableContent.Append("<td>IsRead</td></tr>"); sbTableContent.Append("</thead>"); if (lstdata.ToList().Count > 0) { foreach (var item in lstdata) { if (item.Is_Read.ToString() == "No") { sbTableContent.Append("<tr style='font-weight:bold;font-style:italic;color:rgb(52, 172, 52)'><td><span onclick=\"GetNoticepopup('" + item.Msg_Code + "')\" style='text-decoration:underline;cursor:pointer'>" + item.Title + "</span></td>"); sbTableContent.Append("<td>" + item.Active_From + "</td>"); sbTableContent.Append("<td>" + item.Active_To + "</td>"); sbTableContent.Append("<td>" + item.Employee_Name + "(" + item.Author + ")</td>"); sbTableContent.Append("<td>" + item.Is_Read + "</td></tr>"); } } } else { sbTableContent.Append("No records found"); } return(sbTableContent.ToString()); } catch (Exception ex) { Dictionary <string, string> dicContext = new Dictionary <string, string>(); dicContext.Add("Filter:CompanyCode", companyCode); dicContext.Add("Filter:UserCode", userCode); DataControl.Impl.ExceptionHandler.WriteLog(ex, dicContext); throw new Exception("Sorry an error occurred. Please try again later"); throw ex; } }
public JsonResult GetlockReleaseDataforactivity(string user_Code, string showmore) { try { _objCurrentInfo = new CurrentInfo(); string company_Code = _objCurrentInfo.GetCompanyCode(); DataControl.HiDoctor_ActivityFactoryClasses.BL_NoticeBoard objNot = new DataControl.HiDoctor_ActivityFactoryClasses.BL_NoticeBoard(); List <DCRActivityLockModel> lstDCRActivityLock = objNot.GetDcrLockReleaseDatesforactivity(company_Code, user_Code, showmore); //JsonResult strLockTableBuilder = GetLockedReleasedINHTMLFormat(lstDCRActivityLock); return(Json(lstDCRActivityLock, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { Dictionary <string, string> dicContext = new Dictionary <string, string>(); dicContext.Add("Tree Selected user:", user_Code); //Filter indicates UI level filters DataControl.Impl.ExceptionHandler.WriteLog(ex, dicContext); throw; } }