public ActionResult PrivacyPolicy(FormCollection form)
 {
     if (Session["Role"].ToString() == "N")
     {
         Response.Write("Access denied!");
         return(null);
     }
     else
     {
         RepositoryOBTRS db = new RepositoryOBTRS();
         ViewData["Data"] = db.GetPrivacyPolicy();
         if (form.Get("RichTextEditor") != null)
         {
             if (Session["Role"].ToString() == "R")
             {
                 ViewData["Result"] = "Your role is readonly";
             }
             else
             {
                 ViewData["Result"] = db.UpdatePrivacyPolicy(form.Get("RichTextEditor"));
                 ViewData["Data"]   = db.GetPrivacyPolicy();
             }
             return(View());
         }
         else
         {
             ViewData["Result"] = "";
         }
         return(View());
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Privacy Policy
 /// </summary>
 /// <returns></returns>
 public ActionResult PrivacyPolicy()
 {
     try
     {
         RepositoryOBTRS db = new RepositoryOBTRS();
         ViewData["Data"] = db.GetPrivacyPolicy();
     }
     catch (Exception)
     {
         Response.Write("<strong style='font-size:12pt'>Have a error in during request to server!</strong>");
         Response.Write("<br>Sorry for this inconvenience! Please<a href='/Home'> click here</a> to HOME PAGE.");
         //throw;
         return(null);
     }
     return(View());
 }