//View Approve
        public ActionResult Approve(int id)
        {
            PromotionViewModel model = PromotionRepo.GetById(id);

            ViewBag.Employee = new SelectList(PromotionRepo.GetStaff(), "Id", "Full_Name");
            UserViewModel currentuser = PromotionRepo.GetIdByName(User.Identity.Name);

            if (model.FlagDesign == "Yes")
            {
                return(PartialView("_Approve", model));
            }
            else
            {
                return(PartialView("_ApproveNo", model));
            }

            if (currentuser.Role == "Admin")
            {
                ViewBag.Employee = new SelectList(EmployeeRepo.Get(), "Id", "FullName");
                return(PartialView("_Approve", PromotionRepo.GetById(id)));
            }
            else
            {
                return(new RedirectToRouteResult(new RouteValueDictionary(new { controller = "AccessDenied", action = "Index" })));
            }
        }
        //Get Create 3
        public ActionResult Create3(int eventid)
        {
            UserViewModel model2 = PromotionRepo.GetIdByName(User.Identity.Name);

            ViewBag.EventCode = new SelectList(EventRepo.Get(), "id", "Code");
            PromotionViewModel model = new PromotionViewModel();

            model.RequestBy  = model2.Fullname;
            model.T_Event_Id = eventid;
            return(PartialView("_Create3", model));
        }
        public ActionResult Approve(PromotionViewModel model)
        {
            UserViewModel model1 = PromotionRepo.GetIdByName(User.Identity.Name);

            model.Approved_By = model1.M_Employee_Id;
            ResultResponse result = PromotionRepo.Approve(model);

            return(Json(new
            {
                success = result.Success,
                entity = model,
                message = result.Message
            }, JsonRequestBehavior.AllowGet));
        }
        public ActionResult Create3(PromotionViewModel model, List <PromotionItemFileViewModel> fileModel)
        {
            UserViewModel model2 = PromotionRepo.GetIdByName(User.Identity.Name);

            model.Create_By  = User.Identity.Name;
            model.Request_By = model2.M_Employee_Id;
            ResultResponse result = PromotionRepo.UpdateCreate3(model, fileModel, model.Id);

            return(Json(new
            {
                success = result.Success,
                entity = model,
                message = result.Message
            }, JsonRequestBehavior.AllowGet));
        }