public string AddManager(string uids, int structID, string op = "add") { SafeSC.CheckIDSEx(uids); if (structID < 1 || string.IsNullOrEmpty(uids)) { return(""); } M_Structure strMod = SelReturnModel(structID); if (op.Equals("add")) { strMod.ManagerIDS = StrHelper.AddToIDS(strMod.ManagerIDS, uids.Split(',')); } else { strMod.ManagerIDS = StrHelper.RemoveRepeat(strMod.ManagerIDS.Split(','), uids.Split(',')); } string sql = "UPDATE " + TbName + " SET ManagerIDS=@uids WHERE ID=" + structID; SqlParameter[] sp = new SqlParameter[] { new SqlParameter("uids", strMod.ManagerIDS) }; SqlHelper.ExecuteNonQuery(CommandType.Text, sql, sp); return(strMod.ManagerIDS); }
private void MyBind() { DataTable dt = new DataTable(); if (!string.IsNullOrEmpty(KeyWord)) { dt = buser.SearchByInfo(KeyWord); curLabel.Text = "关键词搜索"; } else if (!string.IsNullOrEmpty(GroupID)) { M_Structure strmod = struBll.SelReturnModel(DataConvert.CLng(GroupID)); ManagerIDS = strmod.ManagerIDS; dt = buser.SelectUserByIds(strmod.UserIDS); } else { dt = buser.SelAll(); curLabel.Text = "全部会员"; } RPT.DataSource = dt; RPT.DataBind(); }
public bool Update(M_Structure model) { return(DBCenter.UpdateByID(model, model.ID)); }
public int Insert(M_Structure model) { return(DBCenter.Insert(model)); }
public bool Update(M_Structure model) { return(UpdateMapByMid(model)); }
public int Add(M_Structure model) { return(Insert(model)); }
public bool UpdateMapByMid(M_Structure model) { return(Sql.UpdateByID(strTableName, "ID", model.ID, BLLCommon.GetFieldAndPara(model), model.GetParameters())); }