Beispiel #1
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);
        }