private string UpdateUserAppFieldsInfo() { SetUserAppFieldsInfoParams actionParams = JavaScriptConvert.DeserializeObject <SetUserAppFieldsInfoParams>(UnicodeToString(JsonParams)); UserApplicationInfo userAppInfo = ManyouApplications.GetUserApplicationInfo(actionParams.UId, actionParams.AppId.ToString())[0]; userAppInfo.MYML = actionParams.Markup != "" ? actionParams.Markup : userAppInfo.MYML; userAppInfo.ProfileLink = actionParams.ActionMarkup != "" ? actionParams.ActionMarkup : userAppInfo.ProfileLink; return(GetResult(ManyouApplications.UpdateUserApplication(userAppInfo))); }
public string Update() { UpdateUserApplicationParams actionParam = JavaScriptConvert.DeserializeObject <UpdateUserApplicationParams>(UnicodeToString(JsonParams)); UserApplicationInfo userAppInfo = new UserApplicationInfo(); userAppInfo.AppId = actionParam.AppIds[0]; userAppInfo.AppName = actionParam.AppName; userAppInfo.Uid = actionParam.Uid; userAppInfo.AllowFeed = actionParam.AllowFeed == null || (bool)actionParam.AllowFeed ? 1 : 0;//可不传递型属性处理实例 userAppInfo.AllowProfileLink = actionParam.AllowProfileLink == null || (bool)actionParam.AllowProfileLink ? 1 : 0; userAppInfo.AllowSideNav = actionParam.AllowSideNav == null || (bool)actionParam.AllowSideNav ? 1 : 0; userAppInfo.DisplayOrder = actionParam.DisplayOrder == null ? 0 : (int)actionParam.DisplayOrder; userAppInfo.Privacy = Utils.GetEnum <PrivacyEnum>(actionParam.Privacy, PrivacyEnum.Public); //不确定代码 userAppInfo.ProfileLink = actionParam.DefaultProfileLink; userAppInfo.MYML = actionParam.DefaultMYML; return(GetResult(ManyouApplications.UpdateUserApplication(userAppInfo) > -1)); }