public JObject ManageAgentScoreCards(HttpContext context) { JObject resultObj = new JObject(); try { Press3.BusinessRulesLayer.Scorecards scoreCardObj = new Press3.BusinessRulesLayer.Scorecards(); 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"]; scoresObj.IsDraft = Convert.ToBoolean(Convert.ToInt16(context.Request["isDraft"])); resultObj = scoreCardObj.ManageAgentScoreCards(MyConfig.MyConnectionString, scoresObj); } catch (Exception ex) { Logger.Error(ex.ToString()); throw ex; } return(resultObj); }
public JObject GetScorecards(HttpContext context) { JObject resultObj = new JObject(); try { Press3.BusinessRulesLayer.Scorecards ScoreObj = new Press3.BusinessRulesLayer.Scorecards(); resultObj = ScoreObj.GetScorecards(MyConfig.MyConnectionString, accountId); } catch (Exception ex) { Logger.Error(ex.ToString()); } return(resultObj); }
public JObject GetCallEvaluationReports(HttpContext context) { JObject resultObj = new JObject(); try { Press3.BusinessRulesLayer.Scorecards scoreCardObj = new Press3.BusinessRulesLayer.Scorecards(); resultObj = scoreCardObj.GetCallEvaluationReports(MyConfig.MyConnectionString, accountId, Convert.ToInt32(context.Request["agentId"]), context.Request["fromDate"], context.Request["toDate"], Convert.ToInt32(context.Request["index"]), Convert.ToInt32(context.Request["lenght"])); } catch (Exception ex) { Logger.Error(ex.ToString()); throw ex; } return(resultObj); }
public JObject GetAgentScoreCards(HttpContext context) { JObject resultObj = new JObject(); try { Press3.BusinessRulesLayer.Scorecards scoreCardObj = new Press3.BusinessRulesLayer.Scorecards(); resultObj = scoreCardObj.GetAgentScoreCards(MyConfig.MyConnectionString, accountId, Convert.ToInt32(context.Request["agentId"]), Convert.ToInt32(context.Request["callId"])); } catch (Exception ex) { Logger.Error(ex.ToString()); throw ex; } return(resultObj); }
public JObject Update(HttpContext context) { JObject resultObj = new JObject(); string scorecard = context.Request["data"]; try { Press3.BusinessRulesLayer.Scorecards ScoreObj = new Press3.BusinessRulesLayer.Scorecards(); resultObj = ScoreObj.Update(MyConfig.MyConnectionString, scorecard, accountId, agentId); } catch (Exception ex) { Logger.Error(ex.ToString()); } return(resultObj); }
public JObject ViewScorecards(HttpContext context) { JObject resultObj = new JObject(); int scorecardId = Convert.ToInt32(context.Request["scorecardId"]); try { Press3.BusinessRulesLayer.Scorecards scoreObj = new Press3.BusinessRulesLayer.Scorecards(); resultObj = scoreObj.ViewScorecards(MyConfig.MyConnectionString, accountId, scorecardId); } catch (Exception ex) { Logger.Error(ex.ToString()); } return(resultObj); }
public JObject UploadExcelSections(HttpContext context) { JObject resultObj = new JObject(); string fileName = context.Request["path"].ToString(); string xlSheetData = context.Request["semidata"].ToString(); string header = context.Request["header"]; string scorecardTitle = context.Request["scorecardTitle"]; int skillGroupId = Convert.ToInt32(context.Request["skillGroupId"]); string excelUploadPath = HttpContext.Current.Server.MapPath("~/ScorecardFileUpload/"); try { Press3.BusinessRulesLayer.Scorecards ScoreObj = new Press3.BusinessRulesLayer.Scorecards(); resultObj = ScoreObj.UploadExcelSections(MyConfig.MyConnectionString, excelUploadPath, fileName, xlSheetData, header, scorecardTitle, skillGroupId, accountId, agentId); } catch (Exception ex) { Logger.Error(ex.ToString()); } return(resultObj); }