示例#1
0
        public ActionResult Index(string StaffNo, string startRechargeMoney, string endRechargeMoney, string startRechargeDatetime, string endRechargeDatetime, int?page)
        {
            List <recharge> rechargeList = GetInfoManager.GetRecharge(StaffNo, startRechargeMoney, endRechargeMoney, startRechargeDatetime, endRechargeDatetime);

            //ViewData["rechargeList"] = rechargeList;
            //ViewData.Model = rechargeList;

            //第几页
            int pageNumber = page ?? 1;

            //显示共多少条记录
            int pageSize = int.Parse(ConfigurationManager.AppSettings["pageSize"]);

            //int totality = rechargeList.Count();

            //根据ID排序
            //staffList = staffList.ToList();
            rechargeList = rechargeList.OrderByDescending(x => x.ID).ToList();

            //通过ToPagedList扩展方法进行分页
            IPagedList <recharge> pagedList = rechargeList.ToPagedList(pageNumber, pageSize);

            //将分页处理后的列表传给View
            return(View(pagedList));
        }
示例#2
0
        public ActionResult Index(string ID, string BookStaffNo, string startBookDatetime, string endBookDatetime, int?page)
        {
            List <dinnerbook> dinnerbookList = GetInfoManager.GetDinnerbook(ID, BookStaffNo, startBookDatetime, endBookDatetime);

            //ViewData["dinnerbookList"] = dinnerbookList;
            //ViewData.Model = dinnerbookList;

            //第几页
            int pageNumber = page ?? 1;

            //显示共多少条记录
            int pageSize = int.Parse(ConfigurationManager.AppSettings["pageSize"]);

            //int totality = dinnerbookList.Count();

            //根据ID排序
            //staffList = staffList.ToList();
            dinnerbookList = dinnerbookList.OrderByDescending(x => x.ID).ToList();

            //通过ToPagedList扩展方法进行分页
            IPagedList <dinnerbook> pagedList = dinnerbookList.ToPagedList(pageNumber, pageSize);

            //将分页处理后的列表传给View
            return(View(pagedList));
        }
示例#3
0
        public ActionResult GetStaffGroupList(int ID, int?page)
        {
            List <staffGroup> staffGroupList = GetInfoManager.GetStaffGroup(ID);

            //ViewData["staffGroupList"] = staffGroupList;
            //ViewData.Model = staffGroupList;

            //第几页
            int pageNumber = page ?? 1;

            //显示共多少条记录
            int pageSize = int.Parse(ConfigurationManager.AppSettings["pageSize"]);

            //int totality = staffGroupList.Count();

            //根据ID排序
            //staffList = staffList.ToList();
            staffGroupList = staffGroupList.OrderByDescending(x => x.StaffNo).ToList();

            //通过ToPagedList扩展方法进行分页
            IPagedList <staffGroup> pagedList = staffGroupList.ToPagedList(pageNumber, pageSize);

            //将分页处理后的列表传给View
            return(Json(pagedList, JsonRequestBehavior.AllowGet));
        }
示例#4
0
        public ActionResult ChangePasswordConfirmed(int ID, string OldPwd, string NewPwd, string ConfirmPwd)
        {
            string Password = GetInfoManager.GetPwd(ID);
            string Pwd      = SIStudio.Framework.SISecurity.MD5(OldPwd);

            if (string.Compare(Password, Pwd, true) == 0)
            {
                if (NewPwd == ConfirmPwd)
                {
                    UpdateManager.UpdateStaffPwd(ID, NewPwd);
                    //return Content("<script >alert('密码修改成功!');window.location.href='/Home/Index'</script >", "text/html");
                    string script = "alert('密码修改成功!');parent.jQuery.colorbox.close();";
                    return(JavaScript(script));
                }
                else
                {
                    //string text = "<script >alert('两次输入的密码不相同,请重新输入!');window.location.href='/Account/ChangePassword/" + ID.ToString() + "'</script >";
                    //return Content(text, "text/html");
                    string script = "alert('两次输入的密码不相同,请重新输入!');";
                    return(JavaScript(script));
                }
            }
            else
            {
                //string text = "<script >alert('密码输入有误,请重新输入!');window.location.href='/Account/ChangePassword/" + ID.ToString() + "'</script >";
                //return Content(text, "text/html");
                //return Content("<script >alert('密码输入有误!')", "text/javascript");
                string script = "alert('密码输入有误!');";
                return(JavaScript(script));
            }
            //return RedirectToAction("Index", "Home");
        }
示例#5
0
        public ActionResult Index(string StaffNo, string StaffName, string startBalance, string endBalance, int?page)
        {
            List <staff> staffList = GetInfoManager.GetStaff(StaffNo, StaffName, startBalance, endBalance);

            //ViewData["staffList"] = staffList;
            //ViewData.Model = staffList;

            //第几页
            int pageNumber = page ?? 1;

            //显示共多少条记录
            int pageSize = int.Parse(ConfigurationManager.AppSettings["pageSize"]);

            //int totality = staffList.Count();

            //根据ID排序
            //staffList = staffList.ToList();
            staffList = staffList.OrderByDescending(x => x.ID).ToList();

            //通过ToPagedList扩展方法进行分页
            IPagedList <staff> pagedList = staffList.ToPagedList(pageNumber, pageSize);

            //将分页处理后的列表传给View
            return(View(pagedList));
        }
示例#6
0
        public ActionResult Create()
        {
            List <group> groupList = GetInfoManager.GetGroup();

            ViewData["staffgroup"] = groupList;

            return(View());
        }
示例#7
0
        public ActionResult Indexs(int?page)
        {
            List <group> groupList = GetInfoManager.GetGroup();

            ViewData["staffgroup"] = groupList;

            return(View());
        }
示例#8
0
        public ActionResult Edit(int ID)
        {
            List <group> groupMembersList = GetInfoManager.GetGroupInfoEdit(ID);

            ViewData["groupMembersList"] = groupMembersList;
            ViewData.Model = groupMembersList;
            return(View());
        }
示例#9
0
        public ActionResult Create(int ID)
        {
            List <recharge> rechargeList = GetInfoManager.GetStaffNo(ID);

            ViewData["rechargeList"] = rechargeList;
            ViewData.Model           = rechargeList;
            return(View());
        }
示例#10
0
        public ActionResult Details(int ID)
        {
            List <staff> staffList = GetInfoManager.GetStaffInfo(ID);

            ViewData["staffList"] = staffList;
            ViewData.Model        = staffList;
            return(View());
        }
示例#11
0
        public ActionResult Add(int ID)
        {
            List <groupMembers> groupMembersList = GetInfoManager.GetGroupInfo(ID);

            ViewData["groupMembersList"] = groupMembersList;
            ViewData.Model = groupMembersList;

            List <staff> staffList = GetInfoManager.GetStaff(ID);

            ViewData["staffList"] = staffList;

            return(View());
        }
示例#12
0
        public ActionResult Create(decimal TotalPrices, string[] ArrStaffNo, decimal ConsumeMoney, DateTime BookDatetime, string Remark, int Num = 0)
        {
            FillDataManager.FillDinnerbook(TotalPrices, BookDatetime, Remark);
            int     BookID           = GetInfoManager.GetBookID();
            decimal LastConsumeMoney = TotalPrices - ConsumeMoney * (Num - 1);

            for (int i = 0; i < Num; i++)
            {
                if (i < Num - 1)
                {
                    FillDataManager.FillConsume(BookID, ArrStaffNo[i], ConsumeMoney, BookDatetime, Remark);
                }
                else
                {
                    FillDataManager.FillConsume(BookID, ArrStaffNo[i], LastConsumeMoney, BookDatetime, Remark);
                }
            }
            //return RedirectToAction("Index");
            string script = "top.location.reload(); parent.jQuery.colorbox.close();";

            return(JavaScript(script));
        }
示例#13
0
        public ActionResult Details(string ID, int?page)
        {
            List <consume> consumeList = GetInfoManager.GetDinnerbookDetails(ID);

            //第几页
            int pageNumber = page ?? 1;

            //显示共多少条记录
            int pageSize = int.Parse(ConfigurationManager.AppSettings["pageSize"]);

            //int totality = consumeList.Count();

            //根据ID排序
            //staffList = staffList.ToList();
            consumeList = consumeList.OrderByDescending(x => x.ID).ToList();

            //通过ToPagedList扩展方法进行分页
            IPagedList <consume> pagedList = consumeList.ToPagedList(pageNumber, pageSize);

            //将分页处理后的列表传给View
            return(View(pagedList));
        }
示例#14
0
        public ActionResult Edit(int ID)
        {
            List <staff> staffList = GetInfoManager.GetStaffInfo(ID);

            ViewData["staffList"] = staffList;
            int staffpower = GetInfoManager.GetStaffPower(ID);

            SelectListItem[] itemList = new SelectListItem[]
            {
                new SelectListItem()
                {
                    Value = "1", Text = "管理员"
                },
                new SelectListItem()
                {
                    Value = "2", Text = "普通职员"
                }
            };
            ViewData["powerList"] = new SelectList(itemList as IEnumerable, "Value", "Text", staffpower);
            ViewData.Model        = staffList;
            return(View());
        }
示例#15
0
        public ActionResult Index(string StaffNo, string startConsumeoney, string endConsumeMoney, string startConsumeDatetime, string endConsumeDatetime, int?page)
        {
            List <consume> consumeList = GetInfoManager.GetConsume(StaffNo, startConsumeoney, endConsumeMoney, startConsumeDatetime, endConsumeDatetime);

            //ViewData["consumeList"] = consumeList;
            //ViewData.Model = consumeList;

            //第几页
            int pageNumber = page ?? 1;

            //显示共多少条记录
            int pageSize = int.Parse(ConfigurationManager.AppSettings["pageSize"]);

            //int TotalItemCount = consumeList.Count();

            //根据ID排序
            consumeList = consumeList.OrderByDescending(x => x.ID).ToList();

            //通过ToPagedList扩展方法进行分页
            IPagedList <consume> pagedList = consumeList.ToPagedList(pageNumber, pageSize);

            //将分页处理后的列表传给View
            return(View(pagedList));
        }
示例#16
0
        public ActionResult GetForSelect(int ID)
        {
            List <staffGroup> staffList = GetInfoManager.GetStaffGroup(ID);

            return(Json(staffList, JsonRequestBehavior.AllowGet));
        }