Пример #1
0
 public JObject GetContactTable(String connection, int agentId)
 {
     try
     {
         Press3.DataAccessLayer.AgentContact contactTablepObject = new Press3.DataAccessLayer.AgentContact(connection);
         DataSet ds = contactTablepObject.GetContactTable(agentId);
         if (ds == null)
         {
             helper.CreateProperty(UDC.Label.MESSAGE, "No data returned from database");
             helper.CreateProperty(UDC.Label.SUCCESS, false);
         }
         else
         {
             helper.ParseDataSet(ds);
         }
     }
     catch (Exception ex)
     {
         helper.CreateProperty("RetMessage", ex.ToString());
         Logger.Error("Exception In AgentLogout " + ex.ToString());
     }
     return(helper.GetResponse());
 }
Пример #2
0
 public JObject AddContactDetails(String connection, string Number, int agentId, string GroupName, string ExistingGroup, int mode, string Name, string Email, string notes, string Alternatemobile, string OldContact)
 {
     try
     {
         Press3.DataAccessLayer.AgentContact ContactObject = new Press3.DataAccessLayer.AgentContact(connection);
         DataSet ds = ContactObject.AddContactDetails(connection, Number, agentId, GroupName, ExistingGroup, mode, Name, Email, notes, Alternatemobile, OldContact);
         if (ds == null)
         {
             helper.CreateProperty(UDC.Label.MESSAGE, "No data returned from database");
             helper.CreateProperty(UDC.Label.SUCCESS, false);
         }
         else
         {
             helper.ParseDataSet(ds);
         }
     }
     catch (Exception ex)
     {
         helper.CreateProperty(UDC.Label.MESSAGE, ex.ToString());
         helper.CreateProperty(UDC.Label.SUCCESS, false);
         Logger.Error(ex.ToString());
     }
     return(helper.GetResponse());
 }