Example #1
0
        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);
        }
Example #2
0
        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();
        }
Example #3
0
 public bool Update(M_Structure model)
 {
     return(DBCenter.UpdateByID(model, model.ID));
 }
Example #4
0
 public int Insert(M_Structure model)
 {
     return(DBCenter.Insert(model));
 }
Example #5
0
 public bool Update(M_Structure model)
 {
     return(UpdateMapByMid(model));
 }
Example #6
0
 public int Add(M_Structure model)
 {
     return(Insert(model));
 }
Example #7
0
 public bool UpdateMapByMid(M_Structure model)
 {
     return(Sql.UpdateByID(strTableName, "ID", model.ID, BLLCommon.GetFieldAndPara(model), model.GetParameters()));
 }