示例#1
0
 /// <summary>
 /// 添加用户组
 /// </summary>
 /// <param name="Info"></param>
 public void UserGroupInsert(mUserGroup Info)
 {
     SqlParameter[] par = new SqlParameter[]
     {
         new SqlParameter("@Title", Info.Title),
         new SqlParameter("@ParentId", Info.ParentId),
         new SqlParameter("@Note", Info.Note),
         new SqlParameter("@Model", Info.Model),
         new SqlParameter("@RegIntegral", Info.RegIntegral),
         new SqlParameter("@LoginIntegral", Info.LoginIntegral),
         new SqlParameter("@Collection", Info.Collection),
         new SqlParameter("@Invite", Info.Invite),
         new SqlParameter("@RegState", Info.RegState),
         new SqlParameter("@GroupSetting", Info.GroupSetting)
     };
     SQLHelper.ExecuteNonQuery("UserGroupInsert", par);
 }
示例#2
0
 /// <summary>
 /// 修改用户组
 /// </summary>
 /// <param name="Info"></param>
 public int UserGroupUpdate(mUserGroup Info)
 {
     SqlParameter[] par = new SqlParameter[]
     {
         new SqlParameter("@Id", Info.Id),
         new SqlParameter("@Title", Info.Title),
         new SqlParameter("@ParentId", Info.ParentId),
         new SqlParameter("@Note", Info.Note),
         new SqlParameter("@Model", Info.Model),
         new SqlParameter("@RegIntegral", Info.RegIntegral),
         new SqlParameter("@LoginIntegral", Info.LoginIntegral),
         new SqlParameter("@Collection", Info.Collection),
         new SqlParameter("@Invite", Info.Invite),
         new SqlParameter("@RegState", Info.RegState),
         new SqlParameter("@GroupSetting", Info.GroupSetting)
     };
     return(StringDeal.ToInt(SQLHelper.ExecuteScalar("UserGroupEdit", par)));
 }
示例#3
0
        /// <summary>
        /// 根据ID读取单个用户组信息
        /// </summary>
        /// <param name="Info"></param>
        /// <returns></returns>
        public IList <mUserGroup> UserGroupReader(mUserGroup Info)
        {
            IList <mUserGroup> list = new List <mUserGroup>();

            using (SqlDataReader dr = SQLHelper.ExecuteReader("UserGroupRead", Info.Id))
            {
                if (dr.Read())
                {
                    mUserGroup mUG = new mUserGroup();
                    mUG.Title         = dr[0].ToString();
                    mUG.ParentId      = StringDeal.ToInt(dr[1]);
                    mUG.Note          = dr[2].ToString();
                    mUG.Model         = StringDeal.ToInt(dr[3]);
                    mUG.RegIntegral   = StringDeal.ToInt(dr[4]);
                    mUG.LoginIntegral = StringDeal.ToInt(dr[5]);
                    mUG.Collection    = StringDeal.ToInt(dr[6]);
                    mUG.Invite        = StringDeal.ToInt(dr[7]);
                    mUG.RegState      = StringDeal.ToBool(dr[8]);
                    mUG.GroupSetting  = dr[9].ToString();
                    list.Add(mUG);
                }
            }
            return(list);
        }
示例#4
0
 public void UserGroupLock(mUserGroup Info)
 {
     dal.UserGroupLock(Info);
 }
示例#5
0
 public DataSet UserGroupList(mUserGroup Info)
 {
     return(dal.UserGroupList(Info));
 }
示例#6
0
 public IList <mUserGroup> UserGroupReader(mUserGroup Info)
 {
     return(dal.UserGroupReader(Info));
 }
示例#7
0
 public void UserGroupDel(mUserGroup Info)
 {
     dal.UserGroupDel(Info);
 }
示例#8
0
 public int UserGroupUpdate(mUserGroup Info)
 {
     return(dal.UserGroupUpdate(Info));
 }
示例#9
0
 public void UserGroupInsert(mUserGroup Info)
 {
     dal.UserGroupInsert(Info);
 }
示例#10
0
 /// <summary>
 /// 删除用户组
 /// </summary>
 /// <param name="Info"></param>
 public void UserGroupDel(mUserGroup Info)
 {
     SQLHelper.ExecuteNonQuery("UserGroupDel", Info.Id);
 }
示例#11
0
        /// <summary>
        /// 根据父级ID获取用户组列表
        /// </summary>
        /// <param name="ParentId">-1为所有,大于-1为父ID号</param>
        /// <returns></returns>
        public DataSet UserGroupList(mUserGroup Info)
        {
            DataSet ds = SQLHelper.ExecuteDataset("UserGroupList", Info.ParentId);

            return(ds);
        }