private JObject EditLableAndGroups(HttpContext context) { JObject callerDetails = new JObject(); try { Press3.UserDefinedClasses.Callers callersObj = new UserDefinedClasses.Callers(); callersObj.Mode = Convert.ToInt32(context.Request["mode"]); callersObj.AccountId = accountId; callersObj.AgentId = agentId; callersObj.Name = context.Request["Name"].ToString(); callersObj.ColorCode = context.Request["colorCode"].ToString(); callersObj.LabelId = Convert.ToInt32(context.Request["LabelId"]); callersObj.GroupId = Convert.ToInt32(context.Request["groupId"]); Press3.BusinessRulesLayer.Caller callerObject = new Press3.BusinessRulesLayer.Caller(); callerDetails = callerObject.EditLableAndGroups(MyConfig.MyConnectionString, callersObj); } catch (Exception ex) { callerDetails = new JObject(new JProperty("Success", "False"), new JObject("Message", ex.ToString())); Logger.Error(ex.ToString()); } return(callerDetails); }
private JObject GetCallerDetails(HttpContext context) { JObject callerDetails = new JObject(); try { Press3.BusinessRulesLayer.Caller callerObject = new Press3.BusinessRulesLayer.Caller(); string fromNumber = context.Request["FromNumber"].ToString(); string detailsObj = context.Request["DetailsObj"].ToString(); int mode = Convert.ToInt32(context.Request["Mode"]); string callerName = context.Request["CallerName"].ToString(); string callerEmail = context.Request["CallerEmail"]; string caller_Id = (context.Request["Caller_Id"] == "" || context.Request["Caller_Id"] == null) ? "" : context.Request["Caller_Id"].ToString(); string callerNumber = (context.Request["CallerMobile"] == "" || context.Request["CallerMobile"] == null) ? "" : context.Request["CallerMobile"].ToString(); callerDetails = callerObject.GetCallerDetails(MyConfig.MyConnectionString, fromNumber, agentId, detailsObj, mode, accountId, callerName, callerEmail, caller_Id, callerNumber); } catch (Exception ex) { callerDetails = new JObject(new JProperty("Success", "False"), new JObject("Message", ex.ToString())); Logger.Error(ex.ToString()); } return(callerDetails); }
private JObject CallersManagement(HttpContext context) { JObject callerDetails = new JObject(); try { Press3.UserDefinedClasses.Callers callersObj = new UserDefinedClasses.Callers(); callersObj.Mode = Convert.ToInt32(context.Request["mode"]); callersObj.AccountId = accountId; callersObj.AgentId = agentId; callersObj.SearchText = context.Request["searchText"] != null ? context.Request["searchText"].ToString() : ""; callersObj.GroupId = Convert.ToInt32(context.Request["groupId"]); callersObj.LabelId = Convert.ToInt32(context.Request["labelId"]); callersObj.PageLength = Convert.ToInt32(context.Request["PageLength"]); callersObj.PageIndex = Convert.ToInt32(context.Request["PageIndex"]); Press3.BusinessRulesLayer.Caller callerObject = new Press3.BusinessRulesLayer.Caller(); callerDetails = callerObject.CallersManagement(MyConfig.MyConnectionString, callersObj); } catch (Exception ex) { callerDetails = new JObject(new JProperty("Success", "False"), new JObject("Message", ex.ToString())); Logger.Error(ex.ToString()); } return(callerDetails); }
public JObject GetCallerCallHistory(HttpContext context) { JObject callHistory = new JObject(); try { Press3.BusinessRulesLayer.Caller callerObject = new Press3.BusinessRulesLayer.Caller(); callHistory = callerObject.GetCallerCallHistory(MyConfig.MyConnectionString, accountId, Convert.ToString(context.Request["FromNumber"]), Convert.ToInt32(context.Request["CallId"]), Convert.ToInt32(context.Request["PageSize"]), Convert.ToInt32(context.Request["PageNumber"])); } catch (Exception ex) { callHistory = new JObject(new JProperty("Success", "False"), new JObject("Message", ex.ToString())); Logger.Error(ex.ToString()); } return(callHistory); }
private JObject AddCallersThroughExcel(HttpContext context) { JObject callerDetails = new JObject(); try { Press3.BusinessRulesLayer.Caller callerObject = new Press3.BusinessRulesLayer.Caller(); callerDetails = callerObject.AddCallersThroughExcel(MyConfig.MyConnectionString, accountId, agentId, context.Request["filePath"].ToString(), context.Request["excelData"].ToString(), context.Request["isHeader"].ToString()); } catch (Exception ex) { callerDetails = new JObject(new JProperty("Success", "False"), new JObject("Message", ex.ToString())); Logger.Error(ex.ToString()); } return(callerDetails); }
private JObject AddCallersToGroupsOrLabels(HttpContext context) { JObject callerDetails = new JObject(); try { Press3.UserDefinedClasses.Callers callersObj = new UserDefinedClasses.Callers(); callersObj.Mode = Convert.ToInt32(context.Request["mode"]); callersObj.AccountId = accountId; callersObj.AgentId = agentId; callersObj.CallerIds = context.Request["callerIds"].ToString(); callersObj.GroupId = Convert.ToInt32(context.Request["id"]); int sourcegroupId = Convert.ToInt32(context.Request["sourcegroupId"]); Press3.BusinessRulesLayer.Caller callerObject = new Press3.BusinessRulesLayer.Caller(); callerDetails = callerObject.AddCallersToGroupsOrLabels(MyConfig.MyConnectionString, callersObj, sourcegroupId); } catch (Exception ex) { callerDetails = new JObject(new JProperty("Success", "False"), new JObject("Message", ex.ToString())); Logger.Error(ex.ToString()); } return(callerDetails); }