Esempio n. 1
0
 public List<GroupInfo> mapGroupByName(IDataReader record)
 {
     List<GroupInfo> groupList = new List<GroupInfo>();
     while (record.Read())
     {
         GroupInfo group = new GroupInfo();
         if (record["groupId"] != DBNull.Value)
             group.GroupId = record["groupId"].ToString();
         if (record["groupName"] != DBNull.Value)
             group.GroupName = record["groupName"].ToString();
         if (record["description"] != DBNull.Value)
             group.Description = record["description"].ToString();
         if (record["isPrivate"] != DBNull.Value)
         {
             int i = int.Parse(record["isPrivate"].ToString());
             if (i == 0)
                 group.IsPrivate = false;
             else
                 group.IsPrivate = true;
         }
         groupList.Add(group);
     }
     return groupList;
 }
Esempio n. 2
0
 public GroupInfo mapGroupByID(IDataReader record)
 {
     if (record.Read())
     {
         GroupInfo group = new GroupInfo();
         if (record["groupId"] != DBNull.Value)
             group.GroupId = record["groupId"].ToString();
         if (record["groupName"] != DBNull.Value)
             group.GroupName = record["groupName"].ToString();
         if (record["description"] != DBNull.Value)
             group.Description = record["description"].ToString();
         if (record["isPrivate"] != DBNull.Value)
         {
             int i = int.Parse(record["isPrivate"].ToString());
             if (i == 0)
                 group.IsPrivate = false;
             else
                 group.IsPrivate = true;
         }
         return group;
     }
     return null;
 }
Esempio n. 3
0
 public static bool UpdateGroupInfo(GroupInfo group)
 {
     return ObjectController.DataProvider.UpdateGroupInfo(group);
 }
Esempio n. 4
0
 public bool UpdateGroupInfo(GroupInfo group)
 {
     string query = "CHAT.GROUP_UPDATE";
     try
     {
         OracleDataHelper helper = OracleHelper;
         helper.BeginTransaction();
         helper.ExecuteNonQuery(query, group.GroupId, group.GroupName, group.Description, group.IsPrivate);
         helper.Commit();
     }
     catch (Exception ex)
     {
         OracleHelper.Rollback();
         throw ex;
     }
     return true;
 }
Esempio n. 5
0
 public static bool InsertGroupInfo(GroupInfo group)
 {
     return ObjectController.DataProvider.InsertGroupInfo(group);
 }