public JsonResult SubmitEvent(Shop_EventFeedback ent) { DataTable dtUser = GetCurUser(); ent.CreateUser = dtUser.Rows[0]["names"].ToString(); ent.DepotId=dtUser.Rows[0]["depotid"].ToString(); ent.DepotName=dtUser.Rows[0]["d_name"].ToString(); ent.CreateUserId=dtUser.Rows[0]["employeeid"].ToString(); ent.Branch = dtUser.Rows[0]["d_dq"].ToString(); if (WMFactory.SHOPEventFeedback.Insert(ent)) return Json(ResultMsg.Success("反馈提交成功。")); else return Json(ResultMsg.Failure("反馈提交失败,请重试!")); }
public JsonResult UpdateEvent(Shop_EventFeedback ent) { Shop_EventFeedback se = WMFactory.SHOPEventFeedback.GetById(ent.Id.ToString()); se.Theme = ent.Theme; se.Name = ent.Name; se.Global = ent.Global; se.PlanNum = ent.PlanNum; se.RespondNum = ent.RespondNum; se.FactNum = ent.FactNum; se.BuyNum = ent.BuyNum; se.Price = ent.Price; DataTable dtUser = GetCurUser(); string curUser = dtUser.Rows[0]["names"].ToString(); se.ModifyUser = curUser; if (WMFactory.SHOPEventFeedback.Update(se)) return Json(ResultMsg.Success("反馈修改成功。")); else return Json(ResultMsg.Failure("反馈修改失败,请重试!")); }