コード例 #1
0
 public static int[] ConvertToArrayUsers(BsUsers u_)
 {
     int [] usersId = new int[u_.Count];
     for (int i = 0; i < u_.Count; i++)
     {
         usersId[i] = u_[i]._id;
     }
     return(usersId);
 }
コード例 #2
0
        private BsUsers addObjectsList(DataTable dt_)
        {
            BsUsers objects = new BsUsers();

            foreach (DataRow dr in dt_.Rows)
            {
                objects.Add(Convert.ToInt32(dr["userId"]), setObject(new BsUser(), dr));
            }
            return(objects);
        }
コード例 #3
0
 public void AddUsersByGroup(BsUsers u_, BsGroup g_)
 {
     if (g_.Id <= 0)
     {
         throw new Exception("id group not found");
     }
     Database.DaUsers u = new Database.DaUsers();
     u.DelUsersByGroupId(g_.Id);
     for (int i = 0; i < u_.Count; i++)
     {
         Database.DaGroups.AddGroupUser(u_[i].Id, g_.Id);
     }
 }