public string RepairInfoUpdate(string RepairInfoJson) { //Json转实体类 RepairInfoUpdateInputDTO repairInfo = JsonConvert.DeserializeObject <RepairInfoUpdateInputDTO>(RepairInfoJson); string AdminID = Session["AdminID"].ToString(); //添加数据 if (RepairInfoService.DTOUpdate(repairInfo, AdminID) > 0) { return("ok"); } else { return("no"); } }
/// <summary> /// 修改报修信息 /// </summary> /// <param name="inputEntity"></param> /// <param name="AdminID"></param> /// <returns></returns> public int DTOUpdate(RepairInfoUpdateInputDTO inputEntity, string AdminID) { //先查 RepairInfo model = repairInfoDAL.LoadEntities(u => u.RepairID == inputEntity.RepairID).FirstOrDefault(); if (model != null) { //修改数据 model.RsolveData = inputEntity.RsolveData; model.State = inputEntity.State; model.AdminID = AdminID; model.Remarks = inputEntity.Remarks; return(repairInfoDAL.EditAndSaveChange(model)); } else { return(0); } }