private void Skin(HttpContext context) { Hashtable ht = new Hashtable(); ht.Add("PageIndex", context.Request["PageIndex"].SafeToString()); ht.Add("PageSize", context.Request["PageSize"].SafeToString()); ht.Add("TableName", "UserSkin"); UserSkinService skinbll = new UserSkinService(); DataTable dt = skinbll.GetData(ht, false, " and UserID='" + context.Request["UserID"] + "'"); if (dt.Rows.Count > 0) { jsonModel = new JsonModel { errNum = 0, errMsg = "", retData = dt.Rows[0]["SkinImage"] }; } else { jsonModel = new JsonModel { errNum = 0, errMsg = "", retData = "/DeskManage/images/6.jpg" }; } }
private void AddSkin(HttpContext context) { UserSkinService skinbll = new UserSkinService(); UserSkin entity = new UserSkin(); entity.SkinImage = context.Request["SkinImage"].SafeToString(); entity.UserID = context.Request["UserID"].SafeToString(); jsonModel = skinbll.Update(entity); }