Exemple #1
0
        private JObject TeamManagement(HttpContext context)
        {
            JObject responseJObj = new JObject();

            try
            {
                Press3.BusinessRulesLayer.Manager managerObject = new Press3.BusinessRulesLayer.Manager();
                UserDefinedClasses.TeamManagement tmObj         = new Press3.UserDefinedClasses.TeamManagement();
                tmObj.AgentId = agentId;
                //context.Request["agentId"] != null ? Convert.ToInt32(context.Request["agentId"]) : 0;
                tmObj.AccountId     = accountId;
                tmObj.Supervisor_Id = Convert.ToInt32(context.Request["SupervisorId"]);
                tmObj.Mode          = Convert.ToInt32(context.Request["mode"]);
                tmObj.AgentToAssign = context.Request["AgentToAssign"] != null?Convert.ToInt32(context.Request["AgentToAssign"]) : 0;

                tmObj.AgentToRelease = context.Request["AgentToRelease"] != null?Convert.ToInt32(context.Request["AgentToRelease"]) : 0;

                responseJObj = managerObject.TeamManagement(MyConfig.MyConnectionString, tmObj);
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                throw ex;
            }
            return(responseJObj);
        }
Exemple #2
0
        public JObject ManageTemplates(HttpContext context)
        {
            JObject resultObj = new JObject();

            try
            {
                Press3.BusinessRulesLayer.Manager managerObj = new Press3.BusinessRulesLayer.Manager();
                UDC.Template templateObj = new UDC.Template();
                templateObj.Id           = (context.Request["templateId"] != null && context.Request["templateId"] != "") ? Convert.ToInt32(context.Request["templateId"]) : 0;
                templateObj.AccountId    = accountId;
                templateObj.AgentId      = agentId;
                templateObj.Mode         = Convert.ToByte(context.Request["mode"]);
                templateObj.Name         = context.Request["templateName"];
                templateObj.Subject      = context.Request["templateSubject"];
                templateObj.Content      = context.Request["templateContent"];
                templateObj.TemplateType = (context.Request["templateType"] != null && context.Request["templateType"] != "") ? Convert.ToByte(context.Request["templateType"]) : Convert.ToByte(0);
                resultObj = managerObj.ManageTemplates(MyConfig.MyConnectionString, templateObj);
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                throw ex;
            }
            return(resultObj);
        }
Exemple #3
0
        public JObject TicketPrioritiesManagement(HttpContext context)
        {
            JObject resultObj = new JObject();

            try
            {
                Press3.UserDefinedClasses.Priorities prioritiesObj = new Press3.UserDefinedClasses.Priorities();
                prioritiesObj.Mode           = Convert.ToInt32(context.Request["mode"]);
                prioritiesObj.AccountId      = accountId;
                prioritiesObj.PriorityId     = Convert.ToInt32(context.Request["PriorityId"]);
                prioritiesObj.PriorityName   = context.Request["PriorityName"].ToString();
                prioritiesObj.PriorityUnitId = Convert.ToInt32(context.Request["PriorityUnitId"]);
                prioritiesObj.PriorityValue  = Convert.ToDecimal(context.Request["PriorityValue"]);
                prioritiesObj.ColorCode      = context.Request["ColorCode"].ToString();
                prioritiesObj.AgentId        = agentId;
                Press3.BusinessRulesLayer.Manager managerObj = new Press3.BusinessRulesLayer.Manager();
                resultObj = managerObj.TicketPrioritiesManagement(MyConfig.MyConnectionString, prioritiesObj);
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                throw ex;
            }
            return(resultObj);
        }
Exemple #4
0
        public JObject ManageGeneralSettings(HttpContext context)
        {
            JObject resultObj = new JObject();

            try
            {
                Press3.BusinessRulesLayer.Manager managerObj = new Press3.BusinessRulesLayer.Manager();
                UDC.GeneralSettings generalSettingsObj       = new UDC.GeneralSettings();
                generalSettingsObj.AccountId          = accountId;
                generalSettingsObj.AgentId            = agentId;
                generalSettingsObj.mode               = Convert.ToByte(context.Request["mode"]);
                generalSettingsObj.SLAType            = Convert.ToByte(context.Request["typeofSLA"]);
                generalSettingsObj.ThresholdInSeconds = Convert.ToInt32(context.Request["thresholdInSeconds"]);
                generalSettingsObj.TargetPercentage   = Convert.ToInt32(context.Request["targetPercentage"]);
                generalSettingsObj.IsVoiceMail        = Convert.ToBoolean(Convert.ToInt16(context.Request["isVoiceMail"]));
                generalSettingsObj.DailExtension      = Convert.ToByte(context.Request["dailExtension"]);
                resultObj = managerObj.ManageGeneralSettings(MyConfig.MyConnectionString, generalSettingsObj);
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                throw ex;
            }
            return(resultObj);
        }
Exemple #5
0
        public JObject ManageOutboundCommunicationSettings(HttpContext context)
        {
            JObject resultObj = new JObject();

            try
            {
                Press3.BusinessRulesLayer.Manager managerObj  = new Press3.BusinessRulesLayer.Manager();
                UDC.OutboundCommunicationSettings settingsObj = new UDC.OutboundCommunicationSettings();
                settingsObj.AccountId        = accountId;
                settingsObj.AgentId          = agentId;
                settingsObj.Mode             = Convert.ToByte(context.Request["mode"]);
                settingsObj.CallerId         = (context.Request["callerId"] != null && context.Request["callerId"] != "") ? Convert.ToInt32(context.Request["callerId"]) : 0;
                settingsObj.SenderId         = (context.Request["senderId"] != null && context.Request["senderId"] != "") ? Convert.ToInt32(context.Request["senderId"]) : 0;
                settingsObj.IsCall           = (context.Request["isCall"] != null && context.Request["isCall"] != "") ? Convert.ToBoolean(Convert.ToInt32(context.Request["isCall"])) : Convert.ToBoolean(0);
                settingsObj.IsSenderId       = (context.Request["isSenderId"] != null && context.Request["isSenderId"] != "") ? Convert.ToBoolean(Convert.ToInt32(context.Request["isSenderId"])) : Convert.ToBoolean(0);
                settingsObj.EmailType        = (context.Request["emailType"] != null && context.Request["emailType"] != "") ? Convert.ToByte(context.Request["emailType"]) : Convert.ToByte(0);
                settingsObj.Ip               = context.Request["ip"];
                settingsObj.Port             = Convert.ToInt32(context.Request["port"]);
                settingsObj.AWSKey           = context.Request["keyAWS"];
                settingsObj.AWSSecret        = context.Request["secretAWS"];
                settingsObj.FromEmailAddress = context.Request["fromEmailAddress"];
                resultObj = managerObj.ManageOutboundCommunicationSettings(MyConfig.MyConnectionString, settingsObj);
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                throw ex;
            }
            return(resultObj);
        }
Exemple #6
0
        public JObject ManageAgentScoreCards(HttpContext context)
        {
            JObject resultObj = new JObject();

            try
            {
                Press3.BusinessRulesLayer.Manager managerObj = new Press3.BusinessRulesLayer.Manager();
                UDC.AgentScoreCard scoresObj = new UDC.AgentScoreCard();
                scoresObj.Id          = (context.Request["agentScoreCardId"] != null && context.Request["agentScoreCardId"] != "") ? Convert.ToInt32(context.Request["agentScoreCardId"]) : 0;
                scoresObj.AccountId   = accountId;
                scoresObj.AgentId     = Convert.ToInt32(context.Request["agentId"]);
                scoresObj.CallId      = Convert.ToInt32(context.Request["callId"]);
                scoresObj.ScoreCardId = Convert.ToInt32(context.Request["scoreCardId"]);
                scoresObj.ScoredBy    = agentId;
                scoresObj.TotalScore  = Convert.ToDouble(context.Request["totalScore"]);
                scoresObj.OutOfScore  = Convert.ToDouble(context.Request["outOfScore"]);
                scoresObj.Rating      = Convert.ToDouble(context.Request["rating"]);
                scoresObj.Comments    = context.Request["comments"];
                scoresObj.Scores      = context.Request["scores"];
                resultObj             = managerObj.ManageAgentScoreCards(MyConfig.MyConnectionString, scoresObj);
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                throw ex;
            }
            return(resultObj);
        }
Exemple #7
0
        public JObject GetAgentsHistory(HttpContext context)
        {
            JObject resultObj = new JObject();

            try
            {
                UserDefinedClasses.AgentHistory agentHistory = new UserDefinedClasses.AgentHistory();
                agentHistory.AccountId = accountId;
                agentHistory.AgentId   = context.Request["agentId"] != null?Convert.ToInt32(context.Request["agentId"]) : 0;

                agentHistory.DurationType = context.Request["durationType"] != null?Convert.ToByte(context.Request["durationType"]) : Convert.ToByte(0);

                agentHistory.FromDate     = context.Request["fromDate"];
                agentHistory.ToDate       = context.Request["toDate"];
                agentHistory.SkillGroupId = context.Request["skillGroupId"] != null?Convert.ToInt32(context.Request["skillGroupId"]) : 0;

                agentHistory.Rating = context.Request["rating"] != null?Convert.ToDouble(context.Request["rating"]) : Convert.ToDouble(0);

                agentHistory.Index = context.Request["index"] != null?Convert.ToInt32(context.Request["index"]) : 1;

                agentHistory.Length = context.Request["length"] != null?Convert.ToInt32(context.Request["length"]) : 7;

                agentHistory.SessionAgentId = agentId;
                agentHistory.RoleId         = roleId;

                Press3.BusinessRulesLayer.Manager managerObj = new Press3.BusinessRulesLayer.Manager();
                resultObj = managerObj.GetAgentsHistory(MyConfig.MyConnectionString, agentHistory);
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                throw ex;
            }
            return(resultObj);
        }
Exemple #8
0
        public JObject CreateOrEditGateway(HttpContext context)
        {
            JObject resultObj = new JObject();

            try
            {
                Press3.BusinessRulesLayer.Manager managerObj = new Press3.BusinessRulesLayer.Manager();
                UDC.Gateway gatewayObj = new UDC.Gateway();
                gatewayObj.AccountId           = accountId;
                gatewayObj.Id                  = (context.Request["gatewayId"] != null && context.Request["gatewayId"] != "") ? Convert.ToInt32(context.Request["gatewayId"]) : 0;
                gatewayObj.Name                = context.Request["gatewayName"];
                gatewayObj.Ip                  = context.Request["serverIp"];
                gatewayObj.RangeCallerIds      = context.Request["rangeCallerIds"];
                gatewayObj.IndividualCallerIds = context.Request["individualCallerIds"];
                gatewayObj.DeletedCallerIds    = context.Request["deletedCallerIds"];
                gatewayObj.TotalChannels       = Convert.ToInt32(context.Request["totalChannels"]);

                resultObj = managerObj.CreateOrEditGateway(MyConfig.MyConnectionString, gatewayObj);
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                throw ex;
            }
            return(resultObj);
        }
Exemple #9
0
        public JObject CheckSession(HttpContext context)
        {
            JObject resultObj = new JObject();

            try
            {
                Press3.BusinessRulesLayer.Manager managerObj = new Press3.BusinessRulesLayer.Manager();
                resultObj = managerObj.CheckSession(MyConfig.MyConnectionString, loginId);
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
            }
            return(resultObj);
        }
Exemple #10
0
        public JObject GetAgentsCallAbondanmentByHourReport(HttpContext context)
        {
            JObject resultObj = new JObject();

            try
            {
                Press3.BusinessRulesLayer.Manager managerObj = new Press3.BusinessRulesLayer.Manager();
                resultObj = managerObj.GetAgentsCallAbondanmentByHourReport(MyConfig.MyConnectionString, accountId, agentId, roleId, Convert.ToInt32(context.Request["studioId"]));
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                throw ex;
            }
            return(resultObj);
        }
Exemple #11
0
        public JObject GetAgentsSummary(HttpContext context)
        {
            JObject resultObj = new JObject();

            try
            {
                Press3.BusinessRulesLayer.Manager managerObj = new Press3.BusinessRulesLayer.Manager();
                resultObj = managerObj.GetAgentsSummary(MyConfig.MyConnectionString, accountId, agentId, roleId, Convert.ToByte(context.Request["durationType"]), Convert.ToInt32(context.Request["AgentStatus"]));
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                throw ex;
            }
            return(resultObj);
        }
Exemple #12
0
        public JObject CheckSession(HttpContext context)
        {
            JObject resultObj = new JObject();

            try
            {
                Press3.BusinessRulesLayer.Manager managerObj = new Press3.BusinessRulesLayer.Manager();
                resultObj = managerObj.CheckSession(MyConfig.MyConnectionString, loginId);
                Logger.Debug("Result Object in Conference[CheckSession] With loginId:" + loginId + ",Is:" + resultObj);
            }
            catch (Exception ex)
            {
                Logger.Error("Exception in Conference[CheckSession]" + ex.ToString());
            }
            return(resultObj);
        }
Exemple #13
0
        private JObject AccountSettings(HttpContext context)
        {
            JObject responseJObj = new JObject();

            try
            {
                Press3.BusinessRulesLayer.Manager managerObject = new Press3.BusinessRulesLayer.Manager();
                responseJObj = managerObject.AccountSettings(MyConfig.MyConnectionString, accountId, Convert.ToInt32(context.Request["Mode"]), context.Request["MetaData"].ToString());
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                throw ex;
            }
            return(responseJObj);
        }
Exemple #14
0
        public JObject GetAgentsActiveOrWaitingCalls(HttpContext context)
        {
            JObject resultObj = new JObject();

            try
            {
                Press3.BusinessRulesLayer.Manager managerObj = new Press3.BusinessRulesLayer.Manager();
                resultObj = managerObj.GetAgentsActiveOrWaitingCalls(MyConfig.MyConnectionString, accountId, agentId, roleId, Convert.ToByte(context.Request["statusType"]), Convert.ToByte(context.Request["callType"]), Convert.ToInt32(context.Request["studioId"]));
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                throw ex;
            }
            return(resultObj);
        }
Exemple #15
0
        public JObject GetSenderIds(HttpContext context)
        {
            JObject resultObj = new JObject();

            try
            {
                Press3.BusinessRulesLayer.Manager managerObj = new Press3.BusinessRulesLayer.Manager();
                resultObj = managerObj.GetSenderIds(MyConfig.MyConnectionString, accountId);
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                throw ex;
            }
            return(resultObj);
        }
Exemple #16
0
        public JObject GetSkillGroupScoreCards(HttpContext context)
        {
            JObject resultObj = new JObject();

            try
            {
                Press3.BusinessRulesLayer.Manager managerObj = new Press3.BusinessRulesLayer.Manager();
                resultObj = managerObj.GetSkillGroupScoreCards(MyConfig.MyConnectionString, accountId, Convert.ToInt32(context.Request["callId"]));
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                throw ex;
            }
            return(resultObj);
        }
Exemple #17
0
        private JObject GetDashboardHeadServiceLevels(HttpContext context)
        {
            JObject resultObj = new JObject();

            try
            {
                Press3.BusinessRulesLayer.Manager managerObj = new Press3.BusinessRulesLayer.Manager();
                resultObj = managerObj.GetDashboardHeadServiceLevels(MyConfig.MyConnectionString, accountId, agentId, roleId);
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                throw ex;
            }
            return(resultObj);
        }
Exemple #18
0
        public JObject AssignAgentToVoiceMail(HttpContext context)
        {
            JObject resultObj = new JObject();

            try
            {
                Press3.BusinessRulesLayer.Manager managerObj = new Press3.BusinessRulesLayer.Manager();
                resultObj = managerObj.AssignAgentToVoiceMail(MyConfig.MyConnectionString, accountId, agentId, Convert.ToInt32(context.Request["voiceMailId"]), Convert.ToInt32(context.Request["assignedTo"]));
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                throw ex;
            }
            return(resultObj);
        }
Exemple #19
0
        public JObject GetSLATypes(HttpContext context)
        {
            JObject resultObj = new JObject();

            try
            {
                Press3.BusinessRulesLayer.Manager managerObj = new Press3.BusinessRulesLayer.Manager();
                resultObj = managerObj.GetSLATypes(MyConfig.MyConnectionString, accountId, Convert.ToByte(context.Request["mode"]), Convert.ToByte(context.Request["idSLAType"]));
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                throw ex;
            }
            return(resultObj);
        }
Exemple #20
0
        public JObject SetPriorityForWaitingCalls(HttpContext context)
        {
            JObject resultObj = new JObject();

            try
            {
                Press3.BusinessRulesLayer.Manager managerObj = new Press3.BusinessRulesLayer.Manager();
                resultObj = managerObj.SetPriorityForWaitingCalls(MyConfig.MyConnectionString, Convert.ToInt32(context.Request["callId"]), Convert.ToInt32(context.Request["priority"]));
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                throw ex;
            }
            return(resultObj);
        }
Exemple #21
0
        public JObject GetCallCenterTicketPerformanceReports(HttpContext context)
        {
            JObject resultObj = new JObject();

            try
            {
                Press3.BusinessRulesLayer.Manager managerObj = new Press3.BusinessRulesLayer.Manager();
                resultObj = managerObj.GetCallCenterTicketPerformanceReports(MyConfig.MyConnectionString, accountId, Convert.ToInt32(context.Request["month"]), Convert.ToInt32(context.Request["year"]));
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                throw ex;
            }
            return(resultObj);
        }
Exemple #22
0
        private JObject ManagerCallActions(HttpContext context)
        {
            JObject responseJObj = new JObject();

            try
            {
                Press3.BusinessRulesLayer.Manager callsObject = new Press3.BusinessRulesLayer.Manager();
                responseJObj = callsObject.ManagerCallActions(CommonClasses.MyConfig.MyConnectionString, Convert.ToInt32(context.Request["Mode"]), agentId, accountId, Convert.ToInt32(context.Request["CallId"]), Convert.ToInt32(context.Request["ToAgentId"]), context.Request["CallEvent"].ToString());
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                throw ex;
            }
            return(responseJObj);
        }
Exemple #23
0
        private JObject GetTotalCallsReceivedByHour(HttpContext context)
        {
            JObject resultObj = new JObject();

            try
            {
                Press3.BusinessRulesLayer.Manager managerObj = new Press3.BusinessRulesLayer.Manager();
                resultObj = managerObj.GetTotalCallsReceivedByHour(MyConfig.MyConnectionString, accountId, agentId, roleId);
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                throw ex;
            }
            return(resultObj);
        }
Exemple #24
0
        private JObject getAgentsAvailabilityStatuses(HttpContext context)
        {
            JObject responseJObj = new JObject();

            try
            {
                Press3.BusinessRulesLayer.Manager managerObj = new Press3.BusinessRulesLayer.Manager();
                responseJObj = managerObj.getAgentsAvailabilityStatuses(MyConfig.MyConnectionString, accountId);
            }
            catch (Exception ex)
            {
                responseJObj.Add(new JProperty("Success", "False"));
                Logger.Error(ex.ToString());
                throw ex;
            }
            return(responseJObj);
        }
Exemple #25
0
        public JObject GetAccountCustomers(HttpContext context)
        {
            JObject resultObj = new JObject();

            try
            {
                Press3.BusinessRulesLayer.Manager managerObj = new Press3.BusinessRulesLayer.Manager();
                string searchcontacts = (context.Request["SearchText"] != null && context.Request["SearchText"] != "") ? context.Request["SearchText"]: "";
                resultObj = managerObj.GetAccountCustomers(MyConfig.MyConnectionString, accountId, searchcontacts);
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                throw ex;
            }
            return(resultObj);
        }
Exemple #26
0
        public JObject UpdateCallerIdStatus(HttpContext context)
        {
            JObject resultObj = new JObject();

            try
            {
                Press3.BusinessRulesLayer.Manager managerObj = new Press3.BusinessRulesLayer.Manager();
                resultObj = managerObj.UpdateCallerIdStatus(MyConfig.MyConnectionString, accountId, agentId, Convert.ToInt32(context.Request["statusId"]),
                                                            Convert.ToInt32(context.Request["callerId"])
                                                            );
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                throw ex;
            }
            return(resultObj);
        }
Exemple #27
0
        public JObject GetCallerIdNumbers(HttpContext context)
        {
            JObject resultObj = new JObject();

            try
            {
                Press3.BusinessRulesLayer.Manager managerObj = new Press3.BusinessRulesLayer.Manager();
                resultObj = managerObj.GetCallerIdNumbers(MyConfig.MyConnectionString, accountId, Convert.ToInt32(context.Request["availableStatus"]),
                                                          Convert.ToInt32(context.Request["assignedStatus"]), context.Request["searchText"]
                                                          );
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                throw ex;
            }
            return(resultObj);
        }
Exemple #28
0
        public JObject ManageTicketStatuses(HttpContext context)
        {
            JObject resultObj = new JObject();

            try
            {
                Press3.UserDefinedClasses.TicketStatus statusesObj = new Press3.UserDefinedClasses.TicketStatus();
                statusesObj.Mode      = Convert.ToByte(context.Request["mode"]);
                statusesObj.AccountId = accountId;
                statusesObj.AgentId   = agentId;
                statusesObj.Id        = (context.Request["statusId"] != null && context.Request["statusId"] != "") ? Convert.ToInt32(context.Request["statusId"]) : 0;
                statusesObj.Status    = context.Request["status"];
                statusesObj.ColorCode = context.Request["colorCode"];
                Press3.BusinessRulesLayer.Manager managerObj = new Press3.BusinessRulesLayer.Manager();
                resultObj = managerObj.ManageTicketStatuses(MyConfig.MyConnectionString, statusesObj);
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                throw ex;
            }
            return(resultObj);
        }
Exemple #29
0
        public JObject GetVoiceMails(HttpContext context)
        {
            JObject resultObj = new JObject();

            try
            {
                UDC.VoiceMail voiceMailObj = new UDC.VoiceMail();
                voiceMailObj.AccountId = accountId;
                if (Convert.ToInt32(context.Session["RoleId"]) == 1)
                {
                    voiceMailObj.AgentId = agentId;
                }
                else
                {
                    voiceMailObj.AgentId = Convert.ToInt32(context.Request["AgentId"]);
                }

                voiceMailObj.SessionAgentId = agentId;
                voiceMailObj.RoleId         = roleId;
                voiceMailObj.AssignStatus   = (context.Request["assignStatus"] != null && context.Request["assignStatus"] != "") ? Convert.ToInt32(context.Request["assignStatus"]) : 0;
                voiceMailObj.SkillGroupId   = (context.Request["skillGroupId"] != null && context.Request["skillGroupId"] != "") ? Convert.ToInt32(context.Request["skillGroupId"]) : 0;
                voiceMailObj.FromDate       = context.Request["fromDate"];
                voiceMailObj.ToDate         = context.Request["toDate"];
                voiceMailObj.CallerDetails  = context.Request["callerDetails"];
                voiceMailObj.PageNumber     = (context.Request["index"] != null && context.Request["index"] != "") ? Convert.ToInt32(context.Request["index"]) : 1;
                voiceMailObj.PageSize       = (context.Request["length"] != null && context.Request["length"] != "") ? Convert.ToInt32(context.Request["length"]) : 10;
                voiceMailObj.StudioId       = (context.Request["StudioId"] != null && context.Request["StudioId"] != "") ? Convert.ToInt32(context.Request["StudioId"]) : 0;
                Press3.BusinessRulesLayer.Manager managerObj = new Press3.BusinessRulesLayer.Manager();
                resultObj = managerObj.GetVoiceMails(MyConfig.MyConnectionString, voiceMailObj);
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                throw ex;
            }
            return(resultObj);
        }
Exemple #30
0
        private JObject ManageTimeSlots(HttpContext context)
        {
            JObject responseJObj = new JObject();

            try
            {
                UserDefinedClasses.TimeSlot timeSlot = new UserDefinedClasses.TimeSlot();
                timeSlot.AccountId       = accountId;
                timeSlot.AgentId         = agentId;
                timeSlot.Mode            = context.Request["mode"] != "" ? Convert.ToByte(context.Request["mode"]) : Convert.ToByte(0);
                timeSlot.Id              = (context.Request["timeSlotId"] != null && context.Request["timeSlotId"] != "") ? Convert.ToInt32(context.Request["timeSlotId"]) : 0;
                timeSlot.Name            = context.Request["timeSlotName"];
                timeSlot.TimeSlotTimings = context.Request["timeSlotTimings"];

                Press3.BusinessRulesLayer.Manager managerObject = new Press3.BusinessRulesLayer.Manager();
                responseJObj = managerObject.ManageTimeSlots(MyConfig.MyConnectionString, timeSlot);
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                throw ex;
            }
            return(responseJObj);
        }