Exemplo n.º 1
0
        public ActionResult Index()
        {
            SlotFuncAuthRecordIndexView vm = new SlotFuncAuthRecordIndexView();

            vm.SlotFuncAuthRecords = _SlotFuncAuthRecordService.FindByPageds(null, null, null, 1, _PageSize);

            return(View(vm));
        }
Exemplo n.º 2
0
        public ActionResult CreatePost(SlotFuncAuthRecordIndexView vm)
        {
            int cnt = 0;

            if (ModelState.IsValid)
            {
                vm.AddSlotFuncAuthRecord.Creator        = LoginState.LoginEmployeeId;
                vm.AddSlotFuncAuthRecord.CreateDateTime = System.DateTime.Now;
                cnt = _SlotFuncAuthRecordService.Create(vm.AddSlotFuncAuthRecord);

                if (cnt > 0)
                {
                    TempData["Message"] = string.Format("{0},{1}", "success", "新增成功");
                }
                else
                {
                    TempData["Message"] = string.Format("{0},{1}", "warning", "新增失敗");
                }
            }

            return(RedirectToAction("Index"));
        }
Exemplo n.º 3
0
        public ActionResult IndexPost(SlotFuncAuthRecordIndexView vm)
        {
            vm.SlotFuncAuthRecords = _SlotFuncAuthRecordService.FindByPageds(vm.SearchEmployeeId, vm.SearchEmployeeName, vm.SearchIsCompleted, vm.CurrentPage, _PageSize);

            return(View("Index", vm));
        }