Exemplo 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;
 }
Exemplo 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;
 }
Exemplo n.º 3
0
 public static bool UpdateGroupInfo(GroupInfo group)
 {
     return ObjectController.DataProvider.UpdateGroupInfo(group);
 }
Exemplo 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;
 }
Exemplo n.º 5
0
 public static bool InsertGroupInfo(GroupInfo group)
 {
     return ObjectController.DataProvider.InsertGroupInfo(group);
 }