public JsonResult AddSkin(string SkinTheme, string SkinColor, string SkinName, string SkinBackground, string memo) { UCHome_SkinBLL skinbll = new UCHome_SkinBLL(); UCHome_Skin sysskin = new UCHome_Skin { PKID = Guid.NewGuid(), SkinTheme = SkinTheme, Status = "1", SkinColor = SkinColor, SkinName = SkinName, SkinBackground = SkinBackground, Memo = memo, }; string statuscode = "200"; string msg = ""; try { skinbll.Addsystemskin(sysskin); } catch (Exception) { statuscode = "500"; msg = "操作失败,请重试!"; throw; } JsonResult jr = new JsonResult { Data = new { statuscode, msg } }; return(Json(jr, JsonRequestBehavior.AllowGet)); }
public ActionResult FamSch(string id) { UCHomeEntities uc = new UCHomeEntities(); UCHome_Skin skin = uc.UCHome_Skin.FirstOrDefault(s => s.PIndex > 0); return(View("FamSch", skin)); }
public JsonResult corsgetdata(UCHome_Skin skin) { skin.PKID = Guid.NewGuid(); string apiurl = APIHelper.GetApiUrl("addskin"); var resultdata = HttpClientHelper.POSTMethod(apiurl, skin); return(Json(resultdata, JsonRequestBehavior.AllowGet)); }