/// <summary>
 /// Action to open the Error details page
 /// </summary>, new { @class = "linktext" }
 /// <returns></returns>        
 public ActionResult Editerror(string id = "0")
 {
     try
     {
         ErrorLogs objErrorLogs = new ErrorLogs();
         var nRecord = new GHC_ApplicationErrorsData();
         int nId = Methods.doInt(id);
         if (nId > 0)
         {
             DataRow dr = objDBGHC_ApplicationErrors.GHC_ApplicationErrors_GetAllById(nId);
             if (dr != null)
             {
                 nRecord.nErrorID = Methods.doLong(dr["nErrorID"]);
                 nRecord.sErrorDesc = Methods.CorrectDBNull(dr["sErrorDesc"]);
                 nRecord.dDateCreated = Convert.ToDateTime(Methods.CorrectDBNull(dr["dDateCreated"]));
             }
             objErrorLogs.objErrorLog = nRecord;
         }
         return View("errordetails", objErrorLogModel);
     }
     catch (Exception ex)
     {
         CommonRepository.LogError("ErrorLog", "EditError", ex.ToString());
         Session[Helpers.CommonConstants.Message] = Messages.GetMessage("[Error]");
         Session[Helpers.CommonConstants.MessageType] = "2";
         return RedirectToAction("viewerrors");
     }
 }
        /// <summary>
        /// Function to show view errors page
        /// </summary>
        /// <returns></returns>
        public ActionResult ViewErrors()
        {
            try
            {
                ErrorLogs objErrorLogs = new ErrorLogs();
                DataSet ds = objDBGHC_ApplicationErrors.GHC_ApplicationErrors_GetAll("dDateCreated", "DESC");
                if (ds != null && ds.Tables[1] != null)
                {
                    List<GHC_ApplicationErrorsData> sList = new List<GHC_ApplicationErrorsData>();
                    foreach (DataRow row in ds.Tables[1].Rows)
                    {
                        var nRecord = new GHC_ApplicationErrorsData();
                        nRecord.nErrorID = Methods.doLong(row["nErrorID"]);
                        nRecord.sErrorDesc = Methods.CorrectDBNull(row["sErrorDesc"]);
                        nRecord.dDateCreated = Convert.ToDateTime(Methods.CorrectDBNull(row["dDateCreated"]));
                        sList.Add(nRecord);
                    }
                    objErrorLogs.objErrorLogList= sList;
                }

                return View(objErrorLogModel);
            }
            catch (Exception ex)
            {
                CommonRepository.LogError("ErrorLog", "ViewErrors", ex.ToString());
                Session[Helpers.CommonConstants.Message] = Messages.GetMessage("[Error]");
                Session[Helpers.CommonConstants.MessageType] = "2";
                return RedirectToAction("dashboard", "homes");
            }
        }