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