Beispiel #1
0
 public List<GroupInfo> SearchGroup(string name)
 {
     string query = "CHAT.GROUP_SEARCH";
     IDataReader reader = OracleHelper.ExecuteReader(query, name);
     Mapper map = new Mapper();
     List<GroupInfo> groupList = map.mapGroupByName(reader);
     if (groupList == null)
         return null;
     foreach (GroupInfo group in groupList)
     {
         group.CustomerList = GetCustomersInGroup(group.GroupId);
         group.AdminList = GetAdminsInGroup(group.GroupId);
     }
     return groupList;
 }
Beispiel #2
0
 public List<MessageInfo> SearchMessage(string senderId, string receiverId, DateTime fromDate, DateTime toDate, int messageType)
 {
     string query = "CHAT.MESSAGE_SEARCH";
     IDataReader reader = OracleHelper.ExecuteReader(query, senderId, receiverId, fromDate, toDate, messageType);
     Mapper map = new Mapper();
     return map.mapMessage(reader);
 }
Beispiel #3
0
 public List<MessageInfo> GetOfflineMessageGroup(string customerId, string groupId)
 {
     string query = "CHAT.GETOFFLINEMESSAGEGROUP";
     IDataReader reader = OracleHelper.ExecuteReader(query, customerId, groupId);
     Mapper map = new Mapper();
     return map.mapMessage(reader);
 }
Beispiel #4
0
 public List<CustomerInfo> SearchCustomer(string customerName)
 {
     string query = "CHAT.CUSTOMER_SEARCH";
     IDataReader reader = OracleHelper.ExecuteReader(query, customerName);
     Mapper map = new Mapper();
     List<CustomerInfo> cusList = map.mapCustomerByName(reader);
     return cusList;
 }
Beispiel #5
0
 public InviteGroupRequest GetGroupRequestById(string requestId)
 {
     string query = "CHAT.GROUPREQUEST_GETBYID";
     IDataReader reader = OracleHelper.ExecuteReader(query, requestId);
     Mapper map = new Mapper();
     return map.MapGroupRequestById(reader);
 }
Beispiel #6
0
 public List<string> GetGroupsOfCustomer(string customerId)
 {
     string query = "CHAT.GETGROUPSOFCUSTOMER";
     IDataReader reader = OracleHelper.ExecuteReader(query, customerId);
     Mapper map = new Mapper();
     return map.MapGroupList(reader);
 }
Beispiel #7
0
 public GroupInfo GetGroup(string groupId)
 {
     string query = "CHAT.GROUP_GET_BYID";
     IDataReader reader = OracleHelper.ExecuteReader(query, groupId);
     Mapper map = new Mapper();
     GroupInfo group = map.mapGroupByID(reader);
     if (group == null)
         return null;
     group.CustomerList = GetCustomersInGroup(group.GroupId);
     group.AdminList = GetAdminsInGroup(group.GroupId);
     return group;
 }
Beispiel #8
0
 public Dictionary<string, InviteGroupRequest> GetGroupRequest(string customerId)
 {
     string query = "CHAT.GROUPREQUEST_GET";
     IDataReader reader = OracleHelper.ExecuteReader(query, customerId);
     Mapper map = new Mapper();
     return map.MapGroupRequest(reader);
 }
Beispiel #9
0
 public Dictionary<string, AddFriendRequest> GetFriendRequest(string customerId)
 {
     string query = "CHAT.FRIENDREQUEST_GET";
     IDataReader reader = OracleHelper.ExecuteReader(query, customerId);
     Mapper map = new Mapper();
     return map.MapFriendRequest(reader);
 }
Beispiel #10
0
 public AddFriendRequest GetFriendRequestById(string requestId)
 {
     string query = "CHAT.FRIENDREQUEST_GETBYID";
     IDataReader reader = OracleHelper.ExecuteReader(query, requestId);
     Mapper map = new Mapper();
     return map.MapFriendRequestById(reader);
 }
Beispiel #11
0
 public List<string> GetFriendList(string customerId)
 {
     string query = "CHAT.FRIEND_GET";
     IDataReader reader = OracleHelper.ExecuteReader(query, customerId);
     Mapper map = new Mapper();
     return map.MapFriendList(reader);
 }
Beispiel #12
0
 public List<string> GetCustomersInGroup(string groupId)
 {
     string query = "CHAT.GETCUSTOMERSINGROUP";
     IDataReader reader = OracleHelper.ExecuteReader(query, groupId);
     Mapper map = new Mapper();
     return map.MapCustomerList(reader);
 }
Beispiel #13
0
 public CustomerInfo GetCustomer(string customerId)
 {
     string query = "CHAT.CUSTOMER_GET";
     IDataReader reader = OracleHelper.ExecuteReader(query, customerId);
     Mapper map = new Mapper();
     CustomerInfo cus = map.MapCustomerByID(reader);
     if (cus == null)
         return null;
     cus.FriendList = GetFriendList(customerId);
     cus.GroupList = GetGroupsOfCustomer(customerId);
     return cus;
 }
Beispiel #14
0
 public List<MessageInfo> GetBroadcastMessage(string customerId)
 {
     string query = "CHAT.GETBROADCASTMESSAGE";
     IDataReader reader = OracleHelper.ExecuteReader(query, customerId);
     Mapper map = new Mapper();
     return map.mapMessage(reader);
 }
Beispiel #15
0
 public List<string> GetAdminsInGroup(string groupId)
 {
     string query = "CHAT.GETADMINSINGROUP";
     IDataReader reader = OracleHelper.ExecuteReader(query, groupId);
     Mapper map = new Mapper();
     return map.MapAdminList(reader);
 }