Exemplo n.º 1
0
 public ActionResult OperationsEdit()
 {
     if (!string.IsNullOrEmpty(Session["username"] as string))
     {
         if (Session["roleid"].ToString() == "1" || Session["roleid"].ToString() == "6")
         {
             try
             {
                 OperationsDataMonthly od         = new OperationsDataMonthly();
                 List <Operations>     operations = od.GetOperations();
                 return(View(operations));
             }
             catch (Exception ex)
             {
                 return(View("Error", ex));
             }
         }
         else
         {
             return(View("Accessdenied"));
         }
     }
     else
     {
         return(RedirectToAction("Index", "Login"));
     }
 }
Exemplo n.º 2
0
        public string Print()
        {
            OperationsDataMonthly od         = new OperationsDataMonthly();
            List <Operations>     operations = od.GetOperations();

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