Esempio n. 1
0
        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("添加出错"));
        }
Esempio n. 2
0
        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"));
        }