public bool AddSiteC() { SqlPar par = SqlXml.GetSql("Site", "添加场地"); par.SetParValues(this.site_name, this.site_area, this.site_img, this.site_using_time_total, this.site_desc); return(DB.ExeSql(par) > 0); }
public bool EditPass(string newpass) { SqlPar par = SqlXml.GetSql("ManageUser", "修改密码"); par.SetParValues(newpass, this.uname, this.pass); return(DB.ExeSql(par) > 0); }
public string UpdateImg(string _oldImg) { string mp = STU.Config.folder.UpLoad.MapPath(); if (this.img != "" && this.img != _oldImg) { string new_img = Guid.NewGuid().ToString("N") + System.IO.Path.GetExtension(_oldImg); System.Threading.Thread.Sleep(10); if (!STU.FolderConfig.MoveFile(this.img, new_img, mp)) { return("封面上传失败"); } if (!_oldImg.IsNullOrEmpty()) { System.IO.File.Delete(mp + _oldImg); } this.img = new_img; } else { this.img = _oldImg; } SqlPar par = SqlXml.GetSql("Uploads", "编辑图片"); par.SetParValues(this.name, this.msg, this.img); return(DB.ExeSql(par) > 0 ? "" : "编辑失败"); }
public int SetState(int me) { SqlPar par = SqlXml.GetSql("ManageUser", "变更管理员状态"); par.SetParValues(this.id, me); return(DB.GetScalar(par).toString(-1)); }
public bool DelUserC() { SqlPar par = SqlXml.GetSql("User", "删除用户"); par.SetParValues(this.user_id); return(DB.ExeSql(par) > 0); }
public bool DelSiteC() { SqlPar par = SqlXml.GetSql("Site", "删除场地"); par.SetParValues(this.site_id); return(DB.ExeSql(par) > 0); }
public bool AddWxUser() { SqlPar par = SqlXml.GetSql("User", "添加用户"); par.SetParValues(this.user_phone, this.user_name); return(DB.ExeSql(par) > 0); }
public bool Add() { SqlPar par = SqlXml.GetSql("ManageUser", "添加管理员"); par.SetParValues(this.uname, this.pass, this.name, this.mobile, "Main,EditPass,welcome," + this.flag); //par.Debug(); return(DB.ExeSql(par) > 0); }
public bool UpdateSiteC() { SqlPar par = SqlXml.GetSearchSql("Site", "编辑场地"); par.SetParValues( this.site_name, this.site_area, this.site_img, this.site_using_time_total, this.site_desc, this.site_id ); return(DB.ExeSql(par) > 0); }
public bool UpdateUserInfo() { SqlPar par = SqlXml.GetSearchSql("User", "编辑用户信息"); par.SetParValues( this.user_phone, this.user_id, this.user_name ); return(DB.ExeSql(par) > 0); }
public bool DelActivityC() { SqlPar par = SqlXml.GetSearchSql("Activity", "删除活动信息"); par.SetParValues( this.activity_id ); return(DB.ExeSql(par) > 0); }
public bool Update() { SqlPar par = SqlXml.GetSearchSql("ManageUser", "修改管理员", 0, !this.pass.IsNullOrEmpty(), true); par.SetParValues(this.uname, this.id, this.pass.IsNullOrEmpty() ? null : this.pass, this.name, this.mobile, "Main,EditPass,welcome," + this.flag); return(DB.ExeSql(par) > 0); }
public bool SetUserState() { SqlPar par = SqlXml.GetSql("User", "变更用户状态"); par.SetParValues( this.user_account_state, this.user_id ); return(DB.ExeSql(par) > 0); }
public static string List(int currentpage, int pagesize, string key) { SqlPar par = SqlXml.GetSearchSqlPage("ManageUser", "管理员列表", 0, !key.IsNullOrEmpty() ); par.SetParValues( key.IsNullOrEmpty() ? null : key ); return(ZH.getPageArray(par, currentpage, pagesize).toJson()); }
public static string GetVersionC(int currentpage, int pagesize, string key) { SqlPar par = SqlXml.GetSearchSqlPage("Version", "版本列表", 0, !key.IsNullOrEmpty() ); par.SetParValues( key.IsNullOrEmpty() ? null : key ); return(ZH.getPageArray(par, currentpage, pagesize).toJson()); }
public static Tuple <string, string> access_token() { SqlPar par = SqlXml.GetSql("Index", "获取微信JSAPI"); var ary = DB.GetRow(par); if (ary.IsValue) { return(Tuple.Create(ary[0].toString(), ary[1].toString())); } return(Tuple.Create("", "")); }
public static string GetActivitySignUpC(int currentpage, int pagesize, string key) { SqlPar par = SqlXml.GetSearchSqlPage("Activity", "报名列表", 0, !key.IsNullOrEmpty() ); par.SetParValues( key.IsNullOrEmpty() ? null : key ); return(ZH.getPageArray(par, currentpage, pagesize).toJson()); }
public bool UpdateActivityC() { SqlPar par = SqlXml.GetSearchSql("Activity", "编辑活动信息"); par.SetParValues( this.activity_creater_name, this.activity_name, this.activity_site_id, this.activity_type, this.activity_min_people, this.activity_max_people, this.activity_con, this.activity_work_con, this.activity_img_vedio_url, this.activity_address, this.activity_start_time, this.activity_end_time, this.activity_signup_end_time, this.activity_state, this.activity_id ); return(DB.ExeSql(par) > 0); }
// 添加绘本视频 public string AddImg(string _img) { string mp = STU.Config.folder.UpLoad.MapPath(); this.img = Guid.NewGuid().ToString("N") + System.IO.Path.GetExtension(_img); System.Threading.Thread.Sleep(10); if (!STU.FolderConfig.MoveFile(_img, this.img, mp)) { return("封面上传失败"); } ; SqlPar par = SqlXml.GetSql("Uploads", "添加图片"); par.SetParValues(this.name, this.msg, this.img); return(DB.ExeSql(par) > 0 ? "" : "添加失败"); }
public bool Get() { SqlPar par = SqlXml.GetSql("ManageUser", "获取管理员"); par.SetParValues(this.id); var obj = DB.GetRow(par); if (!obj.IsValue) { return(false); } this.uname = obj["uname"].toString(); this.pass = obj["pwd"].toString(); this.name = obj["name"].toString(); this.mobile = obj["mobile"].toString(); this.state = obj["state"].toString(0); this.flag = obj["flag"].toString(); return(true); }