public HttpResponseMessage UpdateType([FromBody] U_Url_Type t) { U_Url_TypeBLL bllType = new U_Url_TypeBLL(); string returnInfo = string.Empty; try { bllType.Update(t); returnInfo = "修改成功"; } catch (Exception ex) { returnInfo = string.Format("修改发生异常:Exception:{0},StackTrace:{1}", ex.ToString(), ex.StackTrace); } return(JsonConvert.SerializeObject(returnInfo).ToHttpResponseMessage()); }
public ActionResult UpdateType(string Id, string Name, string Status, int sort) { string returnInfo = string.Empty; try { U_Url_Type t = new U_Url_Type(); t.Id = Id; t.Name = Name; t.SortDesc = sort; t.LastUpdate_Time = GetStr.GetCurrentDate; t.LastUpdate_Id = CurrenUserInfo.UserAccount; t.Status = Status.ToEnumByDescription <EnumType>(); returnInfo = HttpHelp.Post <string, U_Url_Type>(ActionEnum.UpdateType, t); } catch (Exception ex) { returnInfo = string.Format("修改发生异常:Exception:{0},StackTrace:{1}", ex.ToString(), ex.StackTrace); } return(this.Json(returnInfo, JsonRequestBehavior.AllowGet)); }