public JsonResult Delete(SHOP_CustomerFeedback _t)
 {
     if (WMFactory.SHOPCustomerFeedback.Delete(s => s.Id == _t.Id ))
         return Json(ResultMsg.Success("删除成功!"));
     else
         return Json(ResultMsg.Failure("删除失败,请您重试!"));
 }
 public JsonResult Post(SHOP_CustomerFeedback _t)
 {
     if (WMFactory.SHOPCustomerFeedback.Insert(_t))
         return Json(ResultMsg.Success("新增成功!"));
     else
         return Json(ResultMsg.Failure("新增失败,请您重试!"));
 }
Exemplo n.º 3
0
        public JsonResult Submit(Guid sid, string oid, SHOP_CustomerFeedback fb)
        {
            if (string.IsNullOrEmpty(fb.CusName) || string.IsNullOrEmpty(fb.Remark))//|| string.IsNullOrEmpty(fb.Mobile)
            {
                return Json(ResultMsg.Failure("请补充完整信息"));
            }
            //验证款号是否存在
            if (!string.IsNullOrEmpty(fb.SKC))
            {
                DataTable dt = WMFactory.Wsrr.CheckSKC(fb.SKC);
                if (dt == null || dt.Rows.Count <= 0 || dt.Rows[0]["STYLEID"].ToString().Length <= 0)
                {
                    return Json(ResultMsg.Failure("该款式不存在!"));
                }
                fb.Series = dt.Rows[0]["NAME5"].ToString();
            }

            //获取用户.A0012002
            DataTable dtUser = WMFactory.Wsrr.CheckS3UserBind(oid);

            fb.Branch = dtUser.Rows[0]["d_dq"].ToString();
            fb.CusManager = dtUser.Rows[0]["names"].ToString();
            fb.DepotName = dtUser.Rows[0]["d_name"].ToString();
            fb.CreateUser = dtUser.Rows[0]["employeeid"].ToString();
            fb.DepotId = dtUser.Rows[0]["depotid"].ToString();

            if (WMFactory.SHOPCustomerFeedback.Insert(fb))
                return Json(ResultMsg.Success("反馈提交成功!"));
            else
                return Json(ResultMsg.Failure("抱歉,提交失败!"));
        }
 public JsonResult Put(SHOP_CustomerFeedback _t)
 {
     ISHOPCustomerFeedbackService service = WMFactory.SHOPCustomerFeedback;
     SHOP_CustomerFeedback entity = service.GetById(_t.Id.ToString());
     entity = AutoMapper<SHOP_CustomerFeedback, SHOP_CustomerFeedback>.Convert(_t, entity);
     if (service.Update(entity))
         return Json(ResultMsg.Success("更新成功!"));
     else
         return Json(ResultMsg.Failure("更新失败,请您重试!"));
 }