Exemplo n.º 1
0
 public ActionResult LegalEdit()
 {
     if (!string.IsNullOrEmpty(Session["username"] as string))
     {
         if (Session["roleid"].ToString() == "1" || Session["roleid"].ToString() == "3")
         {
             try
             {
                 List <Legal> legals = new List <Legal>();
                 LegalData    ld     = new LegalData();
                 legals = ld.GetLegalData();
                 return(View(legals));
             }
             catch (Exception ex)
             {
                 return(View("Error", ex));
             }
         }
         else
         {
             return(View("Accessdenied"));
         }
     }
     else
     {
         return(RedirectToAction("Index", "Login"));
     }
 }
Exemplo n.º 2
0
        public string Print()
        {
            LegalData    ld     = new LegalData();
            List <Legal> legals = ld.GetLegalData();

            return(new PageOrientations().RenderRazorViewToString(this, "Print", legals));
        }
Exemplo n.º 3
0
 // GET: Legal
 public ActionResult Index()
 {
     if (!string.IsNullOrEmpty(Session["username"] as string))
     {
         try
         {
             List <Legal> legals = new List <Legal>();
             LegalData    ld     = new LegalData();
             legals = ld.GetLegalData();
             return(View(legals));
         }
         catch (Exception ex)
         {
             return(View("Error", ex));
         }
     }
     else
     {
         return(RedirectToAction("Index", "Login"));
     }
 }