Esempio n. 1
0
        public ActionResult annulExpanseReports(Guid idExpanseReport)
        {
            ExpanseRepportRepositery expRepRep = new ExpanseRepportRepositery();
            ExpanseReports           expRep    = expRepRep.GetById(idExpanseReport);
            String managerComment  = "no comment";
            String comtableComment = "no comment";
            int    StatusCode      = 35;

            expRepRep.updateStatus(expRep, StatusCode, managerComment, comtableComment);
            return(RedirectToAction("AllExpansesReports"));
        }
Esempio n. 2
0
        public ActionResult validateExpanseReportByAdminOrManager(Guid id)
        {
            ExpanseRepportRepositery expRep = new ExpanseRepportRepositery();
            String         managerComment   = "no comment";
            String         comtableComment  = "no comment";
            int            StatusCode       = 10;
            ExpanseReports expReport        = expRep.GetById(id);

            if (User.IsInRole("Manager"))
            {
                StatusCode = 20;
                expRep.updateStatus(expReport, StatusCode, managerComment, comtableComment);
                return(RedirectToAction("AllExpansesReportsToValid"));
            }
            else if (User.IsInRole("Comptable"))
            {
                StatusCode = 30;
                expRep.updateStatus(expReport, StatusCode, managerComment, comtableComment);
                return(RedirectToAction("AllExpansesReportsToValid"));
            }
            expRep.updateStatus(expReport, StatusCode, managerComment, comtableComment);
            return(RedirectToAction("AllExpansesReportsToValid"));
        }
Esempio n. 3
0
        public ActionResult modifCommentExpanseReports(Guid idExpanseReport)
        {
            ExpanseRepportRepositery expRepRep = new ExpanseRepportRepositery();
            ExpanseReports           expRep    = expRepRep.GetById(idExpanseReport);
            String managerComment  = "no comment";
            String comtableComment = "no comment";
            int    StatusCode      = 15;

            managerComment = Convert.ToString(Request.Form["ManagerComment"]);
            if (User.IsInRole("Comptable"))
            {
                StatusCode      = 25;
                comtableComment = Convert.ToString(Request.Form["ManagerComment"]);
                managerComment  = "no comment";
            }
            expRepRep.updateStatus(expRep, StatusCode, managerComment, comtableComment);
            return(RedirectToAction("AllExpansesReportsToValid"));
        }