/// <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); }
/// <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))); }
/// <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); }
public void UserGroupLock(mUserGroup Info) { dal.UserGroupLock(Info); }
public DataSet UserGroupList(mUserGroup Info) { return(dal.UserGroupList(Info)); }
public IList <mUserGroup> UserGroupReader(mUserGroup Info) { return(dal.UserGroupReader(Info)); }
public void UserGroupDel(mUserGroup Info) { dal.UserGroupDel(Info); }
public int UserGroupUpdate(mUserGroup Info) { return(dal.UserGroupUpdate(Info)); }
public void UserGroupInsert(mUserGroup Info) { dal.UserGroupInsert(Info); }
/// <summary> /// 删除用户组 /// </summary> /// <param name="Info"></param> public void UserGroupDel(mUserGroup Info) { SQLHelper.ExecuteNonQuery("UserGroupDel", Info.Id); }
/// <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); }