コード例 #1
0
ファイル: ProblemController.cs プロジェクト: Haute998/WalkTd
        public ActionResult toAdd1(C_UserAdvice para)
        {
            if (string.IsNullOrWhiteSpace(para.Contents))
            {
                return(Content("Please select the fault problem"));
            }

            if (string.IsNullOrWhiteSpace(para.Phone))
            {
                return(Content("Please fill in the SN code or your phone number"));
            }
            B_bd cnt = B_bd.login(para.Phone);

            if (cnt == null)
            {
                return(Content("The phone number doesn't exist"));
            }
            para.DatCreate = DateTime.Now;
            int rtn = para.InsertAndReturnIdentity();

            if (rtn > 0)
            {
                return(Content("ok"));
            }
            return(Content("Add an error"));
        }
コード例 #2
0
ファイル: ProblemController.cs プロジェクト: Haute998/WalkTd
        public ActionResult toAdd(C_UserAdvice para)
        {
            if (string.IsNullOrWhiteSpace(para.Contents))
            {
                return(Content("请选择故障问题"));
            }

            if (string.IsNullOrWhiteSpace(para.Phone))
            {
                return(Content("请填写SN码或者您的电话号码"));
            }

            B_bd cnt = B_bd.login(para.Phone);

            if (cnt == null)
            {
                return(Content("手机号不存在"));
            }
            para.Name      = para.Name;
            para.DatCreate = DateTime.Now;
            para.State     = "退货";
            int rtn = para.InsertAndReturnIdentity();

            if (rtn > 0)
            {
                return(Content("ok"));
            }
            return(Content("添加出错"));
        }
コード例 #3
0
        public ActionResult GetAdvicePage(C_UserAdvice condition)
        {
            string where = string.Empty;
            where       += "and State='已审核'";
            if (!string.IsNullOrWhiteSpace(Common.Filter(condition.keyword)))
            {
                where += string.Format(@" and (Name like '%{0}%' or Phone like '%{0}%') ", Common.Filter(condition.keyword));
            }

            PageJsonModel <C_UserAdvice> page = new PageJsonModel <C_UserAdvice>();

            page.pageIndex = condition.pageIndex;
            page.pageSize  = condition.pageSize;
            page.strForm   = @"C_UserAdvice";
            page.strSelect = " * ";
            page.strWhere  = where;
            if (string.IsNullOrWhiteSpace(condition.orderby) == false)
            {
                page.strOrder = Common.FilteSQLStr(condition.orderby);
            }
            else
            {
                page.strOrder = "DatCreate asc";
            }

            page.LoadList();
            return(Json(page.pageResponse, JsonRequestBehavior.AllowGet));
        }
コード例 #4
0
        public ContentResult GetNewSYSMsgCnt()
        {
            int userCount   = C_User.GetC_UserBySta("未审核");                    // 非直属待审核
            int OrderCount  = Order.GetC_UserCircles("");                      // 待审核订单
            int OrderCounts = Order.GetOrder("");                              // 未发货订单
            int uCount      = C_User.GetC_UserCircles(0);                      // 直属总部

            int Upcount = C_UserUpGrade.GetC_UserByUpGrade("未审核");             //未审核升级信息
            int acount  = userCount + uCount + Upcount;                        //总和

            int msgcnt = SYSNotifyMsg.GetUnReadMsgCount(CurrentUser.UserName); //未审核信息
            int sggcnt = C_UserAdvice.GetNoAuditCount();

            return(Content(msgcnt + "," + acount + "," + OrderCount + "," + OrderCounts + "," + uCount + "," + userCount + "," + Upcount + "," + sggcnt));
        }
コード例 #5
0
ファイル: ProblemController.cs プロジェクト: Haute998/WalkTd
        //public ActionResult cha(string SN)
        //{

        //    B_bd cnt = B_bd.cha(SN);
        //    if (cnt == null)
        //    {
        //        return Content("SN码不存在");
        //    }
        //     return Content("OK|"+cnt.phone);

        //}
        //产品维修列表
        public ActionResult xiuList(C_UserAdvice condition, string dh)
        {
            PageJsonModel <C_UserAdvice> page = new PageJsonModel <C_UserAdvice>();

            page.pageIndex = condition.pageIndex;
            page.pageSize  = condition.pageSize;
            page.strForm   = "C_UserAdvice";
            page.strSelect = "*";
            page.strWhere  = "  and Phone=" + dh + "";
            page.strOrder  = " ID desc";
            page.LoadListNoCnt();

            if (page.pageResponse != null && page.pageResponse.RtnList != null && page.pageResponse.RtnList.Count > 0)
            {
                return(Json(page.pageResponse, JsonRequestBehavior.AllowGet));
            }
            return(Json("", JsonRequestBehavior.AllowGet));
        }
コード例 #6
0
 public ContentResult ToAdd(string Contents, string Phone, string Name)
 {
     try
     {
         C_UserAdvice c = new C_UserAdvice();
         c.Contents  = Contents;
         c.Phone     = Phone;
         c.Name      = Name;
         c.DatCreate = DateTime.Now;
         c.State     = "未审核";
         c.InsertAndReturnIdentity();
         return(Content("ok"));
     }
     catch (Exception)
     {
         return(Content("提交失败"));
     }
 }
コード例 #7
0
        public ContentResult GetVerify(int ID)
        {
            C_UserAdvice advice = C_UserAdvice.GetEntityByID(ID);

            advice.UserName  = CurrentUser.UserName;
            advice.B_Name    = CurrentUser.Name;
            advice.DatVerify = DateTime.Now;
            advice.State     = "已审核";
            int iRet = advice.UpdateByID();

            if (iRet > 0)
            {
                SYSLog.add("审核了客户名为[" + advice.Name + "]的投诉建议", "后台用户" + CurrentUser.UserName + "(" + CurrentUser.Name + ")", CurrentURL, "审核投诉建议", "电脑端后台");
                return(Content("ok"));
            }
            else
            {
                return(Content("审核失败!"));
            }
        }