Example #1
0
        //显示回收员
        public ActionResult ShowCollector()
        {
            List <UserInfo> usersList = CommonList <UserInfo> .GetList();

            List <CollectorInfo> list = CommonList <CollectorInfo> .GetList();

            ViewBag.user = usersList;
            return(View(list));
        }
Example #2
0
        //交易记录
        public ActionResult GetDeal(string cid = "")
        {
            //交易记录表
            List <DealRecord> dealList = CommonList <DealRecord> .GetList();

            if (cid != "")
            {
                return(View(JsonConvert.DeserializeObject <List <DealRecord> >(JsonConvert.SerializeObject(dealList)).Where(c => c.Cid.Equals(cid))));
            }
            else
            {
                return(View(JsonConvert.DeserializeObject <List <DealRecord> >(JsonConvert.SerializeObject(dealList))));
                //Response.Write("<script>alert('当前没有交易记录')</script>");
            }
        }
Example #3
0
        //修改订单状态
        public void UpdOStatus(string Oid)
        {
            List <OrderInfo> list = CommonList <OrderInfo> .GetList().Where(o => o.Ostatus >= 3).ToList();

            OrderInfo order = list.Where(s => s.Oid.Equals(Oid)).FirstOrDefault();

            order.Ostatus = 4;//已结账
            string content = JsonConvert.SerializeObject(order);
            string str     = HttpClientHelper.SendRequest("BBRecyleAPI/UpdOrder", "put", content);

            if (str == "1")
            {
                Response.Write("<script>alert('审核成功');location.href='/BeiBei/Ordering';</script>");
            }
            else
            {
                Response.Write("<script>alert('审核失败');location.href='/BeiBei/Ordering';</script>");
            }
        }
Example #4
0
        public void Login(string Name, string Pwd)
        {
            List <AdminInfo> adminList = CommonList <AdminInfo> .GetList();

            if (Pwd.Length < 2 && Pwd.Length > 16)
            {
                Response.Write("<script>alert('密码格式错误');</script>");
            }
            else
            {
                adminList = adminList.Where(s => s.Aname.Equals(Name) && s.Apwd.Equals(Pwd)).ToList();
                if (adminList.Count > 0)
                {
                    Response.Write("<script>alert('登录成功!');location.href='/BeiBei/Index'</script>");
                }
                else
                {
                    Response.Write("<script>alert('账号密码输入错误!');</script>");
                }
            }
        }
Example #5
0
        //订单操作
        #region   订单操作
        //订单操作
        public ActionResult Ordering()
        {
            List <OrderInfo> list = CommonList <OrderInfo> .GetList().Where(o => o.Ostatus >= 3).ToList();

            return(View(list));
        }
Example #6
0
        //显示物品信息
        public ActionResult ShowRecycles()
        {
            List <Recycles> recyclesList = CommonList <Recycles> .GetList();

            return(View(recyclesList));
        }