/// <summary> /// this method is used for deactivating the selected Script(s). /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnActivate_Click(object sender, ImageClickEventArgs e) { Int64 returnresult; EScript[] Scripts = GetSelectedScript(); if (Scripts.Length > 0) { StringBuilder strScriptID = new StringBuilder(String.Empty); foreach (EScript oScript in Scripts) { strScriptID.Append("," + oScript.ScriptID.ToString()); } strScriptID.Remove(0, 1); CallCenterDAL callCenterDal = new CallCenterDAL(); returnresult = callCenterDal.SaveScript(strScriptID.ToString(), Convert.ToInt32(EOperationMode.Activate)); errordiv.InnerHtml = (String)GetGlobalResourceObject("Resource", "msgDatabaseResult" + returnresult.ToString()); errordiv.Visible = true; hfScriptID.Value = ""; GetScript(); } }
protected void ibtnStartCall_Click(object sender, ImageClickEventArgs e) { var objCcRepCall = new ECall(); objCcRepCall.CallCenterCallCenterUserID = IoC.Resolve <ISessionContext>().UserSession.CurrentOrganizationRole.OrganizationRoleUserId; objCcRepCall.TimeCreated = DateTime.Now.ToString(); objCcRepCall.IncomingPhoneLine = txtIncomingPhLine.Text; objCcRepCall.CallersPhoneNumber = txtCallersPhNumber.Text; objCcRepCall.CallNotes = new List <ECallCenterNotes>(); objCcRepCall.OutBound = chkOutBoundCall.Checked; var callcenterDal = new CallCenterDAL(); var returnresult = callcenterDal.UpdateCall(objCcRepCall); GuId = Guid.NewGuid().ToString(); var registrationFlow = new RegistrationFlowModel { GuId = GuId, CallId = returnresult, PreQualificationResultId = 0 }; RegistrationFlow = registrationFlow; Response.RedirectUser("BasicCallInfo.aspx?guid=" + GuId); }
/// <summary> /// this method is used for adding new and updating the information regarding the scripttype which is /// called on clicking save button. /// </summary> private void UpdateScriptType() { EScriptType scripttype = new EScriptType(); scripttype.Description = txtDescription.Text; scripttype.ScriptName = txtName.Text; scripttype.Active = true; Int64 returnresult; CallCenterDAL callCenterDal = new CallCenterDAL(); if (hfScriptTypeID.Value.Equals("")) { returnresult = callCenterDal.SaveScriptType(scripttype, Convert.ToInt32(EOperationMode.Insert)); if (returnresult == 0) { returnresult = 9999990; } } else { scripttype.ScriptTypeID = Convert.ToInt32(((DataTable)(ViewState["DSGRID"])).Rows[grdScriptType.Rows[Convert.ToInt32(hfScriptTypeID.Value)].DataItemIndex]["ScriptTypeID"]); returnresult = callCenterDal.SaveScriptType(scripttype, Convert.ToInt32(EOperationMode.Update)); if (returnresult == 0) { returnresult = 9999991; } } errordiv.Visible = true; errordiv.InnerHtml = (String)GetGlobalResourceObject("Resource", "msgDatabaseResult" + returnresult.ToString()); hfScriptTypeID.Value = ""; GetScriptType(); }
public void UpdateCallStatus(int eventid, ECall call) { call.TimeEnd = DateTime.Now.ToString(); call.EventID = eventid; var callcenterDal = new CallCenterDAL(); callcenterDal.UpdateCall(call); }
/// <summary> /// this method fills the datagrid with relevant information /// about the scripts. /// </summary> private void GetScript() { var callCenterDal = new CallCenterDAL(); List <EScript> scripts = callCenterDal.GetScript(string.Empty, 0); var dtScript = new DataTable(); dtScript.Columns.Add("ScriptID", typeof(int)); dtScript.Columns.Add("name"); dtScript.Columns.Add("description"); dtScript.Columns.Add("type"); dtScript.Columns.Add("scripttext"); dtScript.Columns.Add("default"); dtScript.Columns.Add("active"); if (scripts != null && scripts.Count > 0) { for (int icount = 0; icount < scripts.Count; icount++) { if (scripts[icount].Active.ToString().Equals("True")) { dtScript.Rows.Add(new object[] { scripts[icount].ScriptID, scripts[icount].Name, scripts[icount].Description, scripts[icount].ScriptType.ScriptName, scripts[icount].ScriptText, scripts[icount].Default, "Active" }); } else { dtScript.Rows.Add(new object[] { scripts[icount].ScriptID, scripts[icount].Name, scripts[icount].Description, scripts[icount].ScriptType.ScriptName, scripts[icount].ScriptText, scripts[icount].Default, "Deactivated" }); } } errordiv.Visible = false; } else { errordiv.InnerText = "No Records Found"; errordiv.Visible = true; } if ((SortDirection)ViewState["SortDir"] == SortDirection.Ascending) { dtScript.DefaultView.Sort = ViewState["SortExp"] + " asc"; } else { dtScript.DefaultView.Sort = ViewState["SortExp"] + " desc"; } dtScript = dtScript.DefaultView.ToTable(); grdScript.DataSource = dtScript; grdScript.DataBind(); ViewState["DSGRID"] = dtScript; txtName.Text = ""; txtDescription.Text = ""; ddlscripttype.SelectedIndex = 0; hfScriptID.Value = ""; }
private string getScript(string scriptName) { //CallCenterService CService = new CallCenterService(); //EScript[] objManualVerificationScript; //objManualVerificationScript = CService.GetScriptByName(scriptName); CallCenterDAL masterDal = new CallCenterDAL(); return(masterDal.GetScript(scriptName, 2)[0].ScriptText); }
private void EndCall() { var repository = new CallCenterCallRepository(); var objCall = repository.GetCallCenterEntity(CallId); objCall.TimeEnd = DateTime.Now.ToString(); objCall.Status = (long)CallStatus.Attended; var callcenterDal = new CallCenterDAL(); callcenterDal.UpdateCall(objCall); }
/// <summary> /// This method searches for the scripttype by name entered. /// </summary> /// <param name="searchtext"></param> private void SearchScriptType(string searchtext) { CallCenterDAL callCenterDal = new CallCenterDAL(); var scripttype = callCenterDal.GetScriptType(searchtext, 2); DataTable dtScriptType = new DataTable(); dtScriptType.Columns.Add("ScriptTypeID", typeof(Int64)); dtScriptType.Columns.Add("name"); dtScriptType.Columns.Add("description"); dtScriptType.Columns.Add("Active"); if (scripttype != null && scripttype.Count > 0) { for (int icount = 0; icount < scripttype.Count; icount++) { if (scripttype[icount].Active.ToString().Equals("True")) { dtScriptType.Rows.Add(new object[] { scripttype[icount].ScriptTypeID, scripttype[icount].ScriptName, scripttype[icount].Description, "Active" }); } else { dtScriptType.Rows.Add(new object[] { scripttype[icount].ScriptTypeID, scripttype[icount].ScriptName, scripttype[icount].Description, "Deactivated" }); } } errordiv.Visible = false; } else { errordiv.InnerText = "No Records Found"; errordiv.Visible = true; } if ((SortDirection)ViewState["SortScriptType"] == SortDirection.Descending) { dtScriptType.DefaultView.Sort = "name desc"; } else { dtScriptType.DefaultView.Sort = "name asc"; } dtScriptType = dtScriptType.DefaultView.ToTable(); grdScriptType.DataSource = dtScriptType; ViewState["DSGRID"] = dtScriptType; grdScriptType.DataBind(); txtName.Text = ""; txtDescription.Text = ""; hfScriptTypeID.Value = ""; }
/// <summary> /// post back of page is checked.all the active script from database are loaded into the memory /// and array consisting client ids of the elements is created.. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { Page.Title = "Script"; errordiv.InnerText = ""; Franchisor_FranchisorMaster obj; obj = (Franchisor_FranchisorMaster)this.Master; obj.settitle("Script"); obj.SetBreadCrumbRoot = "<a href=\"#\">Master</a>"; if (!IsPostBack) { CallCenterDAL callCenterDal = new CallCenterDAL(); List <EScriptType> scriptTypes = callCenterDal.GetScriptType(string.Empty, 3); List <EScript> scripts = callCenterDal.GetScript(string.Empty, 3); if (scriptTypes.Count > 0) { ddlscripttype.Items.Add(new ListItem("Select Script Type", "0")); for (int count = 0; count < scriptTypes.Count; count++) { ddlscripttype.Items.Add(new ListItem(scriptTypes[count].ScriptName, scriptTypes[count].ScriptTypeID.ToString())); } } else { ddlscripttype.Items.Add("Select"); } ViewState["SortDir"] = SortDirection.Ascending; ViewState["SortExp"] = "name"; if (Request.QueryString["searchtext"] != null) { SearchScript(Request.QueryString["searchtext"]); } else { GetScript(); } } Panel1.Style.Add(HtmlTextWriterStyle.Display, "none"); ClientScript.RegisterArrayDeclaration("arrscriptelemclientid", "'" + grdScript.ClientID + "'"); ClientScript.RegisterArrayDeclaration("arrscriptelemclientid", "'" + btnEdit.ClientID + "'"); ClientScript.RegisterArrayDeclaration("arrscriptelemclientid", "'" + txtName.ClientID + "'"); ClientScript.RegisterArrayDeclaration("arrscriptelemclientid", "'" + txtDescription.ClientID + "'"); ClientScript.RegisterArrayDeclaration("arrscriptelemclientid", "'" + ddlscripttype.ClientID + "'"); ClientScript.RegisterArrayDeclaration("arrscriptelemclientid", "'" + hfScriptID.ClientID + "'"); ClientScript.RegisterArrayDeclaration("arrscriptelemclientid", "'" + chkIsDefault.ClientID + "'"); ClientScript.RegisterArrayDeclaration("arrscriptelemclientid", "'" + txtScriptText.ClientID + "'"); }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { SetTitles(); CustomerHasMammoTest = CheckPreApprovedTest(TestGroup.BreastCancer); if (!IsPostBack) { SetIntialValues(); var callCenterDal = new CallCenterDAL(); var listScriptType = callCenterDal.GetScriptType("Event and Package Selection", 2); var objEventScript = callCenterDal.GetScript(listScriptType[0].ScriptTypeID.ToString(), 4); spEventScript.InnerText = objEventScript[0].ScriptText; if (CustomerId > 0) { BindEventSearchDropdown(Customer); } else { EventSearchTypeDropdownList.Visible = false; EventSearchTypeDropdownList.Visible = false; } SearchEvent(); } else { IsRedirectNonMammoEvent = false; var eventTargetName = Request.Params.Get("__EVENTTARGET"); if (!string.IsNullOrEmpty(eventTargetName) && eventTargetName == "continueWithWarning") { var orgUserId = IoC.Resolve <ISessionContext>().UserSession.CurrentOrganizationRole.OrganizationRoleUserId; var previousEventId = Convert.ToInt64(hfPreviousEventId.Value); if (previousEventId > 0) { IoC.Resolve <Falcon.App.Core.Medical.IEventCustomerQuestionAnswerService>().UpdatePreQualifiedTestAnswers(CustomerId, EventId, previousEventId, orgUserId); } SelectPackage(); } if (!string.IsNullOrEmpty(eventTargetName) && eventTargetName == "redirectNonMammoEvent") { IsRedirectNonMammoEvent = true; SearchEvent(); } } }
/// <summary> /// this method is used for activating the selected ScriptType(s). /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnActivate_Click(object sender, ImageClickEventArgs e) { string strSelectedScriptTypeIDs = GetSelectedScriptTypeIDs(); if (strSelectedScriptTypeIDs.Length > 0) { CallCenterDAL callCenterDal = new CallCenterDAL(); Int64 returnresult = callCenterDal.SaveScriptType(strSelectedScriptTypeIDs, Convert.ToInt32(EOperationMode.Activate)); if (returnresult == 0) { returnresult = 9999994; } errordiv.InnerHtml = (String)GetGlobalResourceObject("Resource", "msgDatabaseResult" + returnresult.ToString()); errordiv.Visible = true; hfScriptTypeID.Value = ""; GetScriptType(); } }
/// <summary> /// this method is used for adding new and updating the information regarding the script which is /// called on clicking save button. /// </summary> private void UpdateScript() { var script = new EScript(); script.Description = txtDescription.Text; script.Name = txtName.Text; script.Active = true; script.Default = chkIsDefault.Checked; script.ScriptText = Server.HtmlDecode(txtScriptText.Text); var scripttype = new EScriptType(); scripttype.ScriptTypeID = Convert.ToInt32(ddlscripttype.SelectedValue); script.ScriptType = scripttype; Int64 returnresult; var callCenterDal = new CallCenterDAL(); if (hfScriptID.Value.Equals("")) { returnresult = callCenterDal.SaveScript(script, Convert.ToInt32(EOperationMode.Insert)); if (returnresult == 0) { returnresult = 9999990; } } else { script.ScriptID = Convert.ToInt32(((DataTable)(ViewState["DSGRID"])).Rows[grdScript.Rows[Convert.ToInt32(hfScriptID.Value)].DataItemIndex]["ScriptID"]); returnresult = callCenterDal.SaveScript(script, Convert.ToInt32(EOperationMode.Update)); if (returnresult == 0) { returnresult = 9999991; } } errordiv.InnerHtml = (String)GetGlobalResourceObject("Resource", "msgDatabaseResult" + returnresult.ToString()); errordiv.Visible = true; hfScriptID.Value = ""; GetScript(); }
private void StartCall(long calledCustomerid) { var objCcRepCall = new ECall(); if (CallId > 0) { var repository = new CallCenterCallRepository(); var call = repository.GetCallCenterEntity(CallId); objCcRepCall.IncomingPhoneLine = call.IncomingPhoneLine; objCcRepCall.CallersPhoneNumber = call.CallersPhoneNumber; } objCcRepCall.CallCenterCallCenterUserID = IoC.Resolve <ISessionContext>().UserSession.CurrentOrganizationRole.OrganizationRoleUserId; objCcRepCall.TimeCreated = DateTime.Now.ToString(); objCcRepCall.CalledCustomerID = calledCustomerid; objCcRepCall.CallNotes = new List <ECallCenterNotes>(); var callcenterDal = new CallCenterDAL(); CallId = callcenterDal.UpdateCall(objCcRepCall); }
private void SearchCustomer() { var repository = new CallCenterCallRepository(); var objCall = repository.GetCallCenterEntity(ExistingCallId); ViewState["IncomingPhoneLine"] = objCall.IncomingPhoneLine; RegistrationFlow.CallSourceCode = txtSourceCode.Text; if (!string.IsNullOrEmpty(txtSourceCode.Text) || !string.IsNullOrEmpty(txtCallBackNo.Text)) { objCall.SourceCode = txtSourceCode.Text; objCall.CallBackNumber = PhoneNumber.ToNumber(txtCallBackNo.Text); var callcenterDal = new CallCenterDAL(); callcenterDal.UpdateCall(objCall); } if (GetCustomerList() == false && (txtCustomerID.Text.Trim().Length > 0 || GetProspectCustomerList() == false)) { if (txtCustomerID.Text.Trim().Length > 0) { ClientScript.RegisterStartupScript(typeof(string), "jscode_NoRecordsFound", "alert('Customer with ID " + txtCustomerID.Text.Trim() + " not found. Please try again.');", true); return; } if (txtCustomerID.Text.Trim().Length == 0) { CurrentProspectCustomerId = 0; SetProspectCustomer(); Response.RedirectUser("CustomerOptions.aspx?FirstName=" + txtFirstName.Text + "&LastName=" + txtLastName.Text + "&CallBackNo=" + txtCallBackNo.Text + "&Zip=" + txtZipCode.Text + "&guid=" + GuId); } } else { if (txtCustomerID.Text.Trim().Length > 0) { Response.RedirectUser("/App/CallCenter/CallCenterRep/CustomerOptions.aspx?CustomerID=" + txtCustomerID.Text.Trim() + "&guid=" + GuId); //Response.RedirectUser("CustomerVerification.aspx?FirstName=" + txtFirstName.Text + "&LastName=" + txtLastName.Text + // (!string.IsNullOrEmpty(txtCallBackNo.Text) ? "&CallBackNo=" + txtCallBackNo.Text : "") + // (!string.IsNullOrEmpty(txtZipCode.Text) ? "&Zip=" + txtZipCode.Text : "") + // (!string.IsNullOrEmpty(txtCustomerID.Text) ? "&CustomerId=" + txtCustomerID.Text.Trim() : "") // + (!string.IsNullOrEmpty(txtMemberId.Text) ? "&MemberId=" + txtMemberId.Text : "") // + (!string.IsNullOrEmpty(txtHicn.Text) ? "&Hicn=" + txtHicn.Text : "") // + (!string.IsNullOrEmpty(txtPhoneNumber.Text) ? "&PhoneNumber=" + txtPhoneNumber.Text : "") // + (!string.IsNullOrEmpty(txtEmail.Text) ? "&EmailId=" + txtEmail.Text : "") // + (!string.IsNullOrEmpty(txtMbiNumber.Text) ? "&MbiNumber=" + txtMbiNumber.Text : "") // + "&guid=" + GuId); } else { if (CurrentProspectCustomerId > 0) { SetProspectCustomer(); } Response.RedirectUser("CustomerVerification.aspx?FirstName=" + txtFirstName.Text + "&LastName=" + txtLastName.Text + (!string.IsNullOrEmpty(txtCallBackNo.Text) ? "&CallBackNo=" + txtCallBackNo.Text : "") + (!string.IsNullOrEmpty(txtZipCode.Text) ? "&Zip=" + txtZipCode.Text : "") + (!string.IsNullOrEmpty(txtMemberId.Text) ? "&MemberId=" + txtMemberId.Text : "") + (!string.IsNullOrEmpty(txtHicn.Text) ? "&Hicn=" + txtHicn.Text : "") + (!string.IsNullOrEmpty(txtPhoneNumber.Text) ? "&PhoneNumber=" + txtPhoneNumber.Text : "") + (!string.IsNullOrEmpty(txtEmail.Text) ? "&EmailId=" + txtEmail.Text : "") + (!string.IsNullOrEmpty(txtMbiNumber.Text) ? "&MbiNumber=" + txtMbiNumber.Text : "") + "&guid=" + GuId); } } }
protected void Page_Load(object sender, EventArgs e) { RegistrationFlow.CanSaveConsentInfo = true; var callCenterMasterPage = (CallCenter_CallCenterMaster1)Master; callCenterMasterPage.SetTitle("Customer Options"); callCenterMasterPage.SetBreadCrumbRoot = "<a href=\"/CallCenter/CallCenterRepDashboard/Index\">Dashboard</a>"; var repository = new CallCenterCallRepository(); ViewScriptDiv.Visible = false; if (!IsPostBack) { hfCallStartTime.Value = repository.GetCallStarttime(ExistingCallId); if (CustomerId > 0) { imgSymbol.ImageUrl = "~/App/Images/CCRep/page3symbol.gif"; divOptions.Style.Add(HtmlTextWriterStyle.Display, "block"); spSearchType.InnerText = "Existing Customer Options"; divNewOptions.Style.Add(HtmlTextWriterStyle.Display, "none"); var customerRepository = IoC.Resolve <ICustomerRepository>(); var customer = customerRepository.GetCustomer(CustomerId); customername.InnerHtml = "<span style=\"color: #F37C00\">" + HttpUtility.HtmlEncode(customer.Name.FullName) + "</span>, how may i help you?"; long?healthPlanId = null; if (!string.IsNullOrEmpty(customer.Tag))// && IsInboundCall { var corporateAccountRepository = IoC.Resolve <ICorporateAccountRepository>(); var corporateAccount = corporateAccountRepository.GetByTag(customer.Tag); if (corporateAccount != null && corporateAccount.IsHealthPlan) { healthPlanId = corporateAccount.Id; } if (IsInboundCall) { if (corporateAccount != null && corporateAccount.ShowCallCenterScript && corporateAccount.CallCenterScriptFileId > 0) { ViewScriptDiv.Visible = true; var fileRepository = IoC.Resolve <IUniqueItemRepository <File> >(); var mediaRepository = IoC.Resolve <IMediaRepository>(); var inboundCallScriptPdf = fileRepository.GetById(corporateAccount.CallCenterScriptFileId); var mediaLocation = mediaRepository.GetCallCenterScriptPdfFolderLocation(); RegistrationFlow.CallCenterScriptUrl = mediaLocation.Url + inboundCallScriptPdf.Path; } if (corporateAccount != null && corporateAccount.WarmTransfer) { var customerWarmTransfer = IoC.Resolve <ICustomerWarmTransferRepository>().GetByCustomerIdAndYear(CustomerId, DateTime.Today.Year); if (customerWarmTransfer != null && customerWarmTransfer.IsWarmTransfer.HasValue && customerWarmTransfer.IsWarmTransfer.Value) { showWarmTransferMessage.Style.Add(HtmlTextWriterStyle.Display, "block"); } } } } repository.UpdateCalledCustomerId(CustomerId, ExistingCallId, healthPlanId, customer.ProductTypeId); } else { imgSymbol.ImageUrl = "~/App/Images/CCRep/page2symbol.gif"; divOptions.Style.Add(HtmlTextWriterStyle.Display, "none"); divNewOptions.Style.Add(HtmlTextWriterStyle.Display, "block"); spSearchType.InnerText = "New Customer Options"; if (ProspectCustomerId > 0) { var prospectCustomerRepository = IoC.Resolve <IUniqueItemRepository <ProspectCustomer> >(); var prospectCustomer = prospectCustomerRepository.GetById(ProspectCustomerId); customername.InnerHtml = "<span style=\"color: #F37C00\">" + HttpUtility.HtmlEncode(prospectCustomer.FirstName) + " " + HttpUtility.HtmlEncode(prospectCustomer.LastName) + "</span>, how may i help you?"; } else { customername.InnerHtml = "<span style=\"color: #F37C00\">" + HttpUtility.HtmlEncode(FirstName) + " " + HttpUtility.HtmlEncode(LastName) + "</span>, how may i help you?"; } } // Coding if the call is for outbound // Set the call as outbound if (Request.QueryString["CallType"] != null) { if (Request.QueryString["CallType"].Equals("OutBound")) { spBtnSearchAgain.Style.Add(HtmlTextWriterStyle.Display, "none"); var callcenterDal = new CallCenterDAL(); List <EScript> outboundCallProspect; if (Request.QueryString["Source"] != null && Request.QueryString["Source"].ToLower() == "online") { int scriptTypeId = callcenterDal.GetScriptType("OutboundOnlineProspect", 2)[0].ScriptTypeID; outboundCallProspect = callcenterDal.GetScript(scriptTypeId.ToString(), 4); string script = outboundCallProspect[0].ScriptText.Replace("<<prospect>>", Server.UrlDecode(Request.QueryString["Name"])).Replace("<<employee>>", HttpUtility.HtmlEncode(IoC.Resolve <ISessionContext>().UserSession.UserName)); customername.InnerHtml = System.Web.Security.AntiXss.AntiXssEncoder.HtmlEncode(script, true); } else { int scriptTypeId = callcenterDal.GetScriptType("OutboundCallCenterProspect", 2)[0].ScriptTypeID; outboundCallProspect = callcenterDal.GetScript(scriptTypeId.ToString(), 4); string script = outboundCallProspect[0].ScriptText.Replace("<<prospect>>", Server.UrlDecode(Request.QueryString["Name"])).Replace("<<employee>>", HttpUtility.HtmlEncode(IoC.Resolve <ISessionContext>().UserSession.UserName)); customername.InnerHtml = System.Web.Security.AntiXss.AntiXssEncoder.HtmlEncode(script, true); } } } } }
public Boolean VerifySourceCode(string sourceCode) { var callcenterDal = new CallCenterDAL(); return(callcenterDal.VerifySourceCode(sourceCode)); }
protected void Page_Load(object sender, EventArgs e) { SetDisplayControls(); if (!IsPostBack) { if (RegistrationFlow != null) { RegistrationFlow.SourceCodeId = 0; RegistrationFlow.SourceCode = string.Empty; RegistrationFlow.SourceCodeAmount = 0; RegistrationFlow.TestIds = null; RegistrationFlow.PackageId = 0; RegistrationFlow.AppointmentSlotIds = null; RegistrationFlow.ShippingDetailId = 0; RegistrationFlow.ShippingOptionId = 0; RegistrationFlow.ShippingAddressId = 0; RegistrationFlow.ProductId = 0; } FillSecurityQuestions(); BindDropDownControls(); if (CustomerType == CustomerType.New && CurrentAction != null && CurrentAction.Equals("Back")) { isPageOpenedByBackClick.Value = "true"; MarketingSourceDropDown.SelectedValue = CurrentCustomer.MarketingSource; } if (CurrentAction != null || CurrentProspectCustomer == null) { SetCustomerDataToControls(); LogAudit(ModelType.View, customerLogEditModel, CustomerId); } else { SetProspectCustomerDataToControls(); LogAudit(ModelType.View, prospectCustomerLogEditModel, CustomerId); } SetJavaScriptEvents(); var callCenterDal = new CallCenterDAL(); var listScriptType = callCenterDal.GetScriptType("Above 40", 2); var objAbove40Script = callCenterDal.GetScript(listScriptType[0].ScriptTypeID.ToString(), 4); if (objAbove40Script.Count > 0) { bubbleContent.InnerText = objAbove40Script[0].ScriptText; } ViewState["RefferedUrl"] = Request.UrlReferrer.PathAndQuery; InsuranceIdContainer.Style.Add(HtmlTextWriterStyle.Display, "none"); InsuranceIdRequiredHiddenField.Value = Boolean.FalseString; var settings = IoC.Resolve <ISettings>(); if (settings.CaptureInsuranceId) { if (EventData != null && EventData.CaptureInsuranceId) { InsuranceIdContainer.Style.Add(HtmlTextWriterStyle.Display, "block"); if (EventData.InsuranceIdRequired) { InsuranceIdRequiredHiddenField.Value = Boolean.TrueString; } } } SsnContainer.Style.Add(HtmlTextWriterStyle.Display, "none"); if (EventId > 0) { var captureSsn = EventRepository.CaptureSsn(EventId); if (captureSsn) { SsnContainer.Style.Add(HtmlTextWriterStyle.Display, "block"); } } } HideUserCredentialPanel(); var toolTipRepository = IoC.Resolve <IToolTipRepository>(); var insuranceIdLabel = toolTipRepository.GetToolTipContentByTag(ToolTipType.InsuranceIdLabel); insuranceIdLabel = string.IsNullOrEmpty(insuranceIdLabel) ? "Insurance Id" : (insuranceIdLabel); if (AccountByEventId != null && !string.IsNullOrEmpty(AccountByEventId.MemberIdLabel)) { insuranceIdLabel = AccountByEventId.MemberIdLabel; } InsuranceIdLabel.InnerText = insuranceIdLabel; MedicareIdRequiredHiddenField.Value = Boolean.FalseString; if (EventId <= 0) { return; } var eventTestRepository = IoC.Resolve <EventTestRepository>(); var eventTestList = eventTestRepository.GetTestsForEvent(EventId); MedicareIdRequiredHiddenField.Value = eventTestList != null && eventTestList.Any(x => x.TestId == (long)TestType.AWV) ? Boolean.TrueString : Boolean.FalseString; }
protected void Page_Load(object sender, EventArgs e) { Page.Title = "Call Center Rep Dashboard"; var obj = (CallCenter_CallCenterMaster)this.Master; obj.settitle("Call Center Rep Dashboard"); obj.SetBreadCrumbRoot = "<a href=\"/CallCenter/CallCenterRepDashboard/Index\">Dashboard</a>"; if (!IsPostBack) { if (Request.UrlReferrer != null && (Request.UrlReferrer.LocalPath != Request.Url.LocalPath)) { if (RegistrationFlow != null) { RegistrationFlow.CallId = 0; } } } if (!IsPostBack) { chkOutBoundCall.Attributes.Add("onClick", "return CheckOutBoundCall();"); ibtnStartCall.Enabled = false; chkOutBoundCall.Enabled = false; if (Session["LastLoginTime"] != null && Session["LastLoginTime"].ToString().Trim() != "") { spLastLogin.InnerText = "Last login: "******"LastLoginTime"].ToString()).ToString("MMMM dd, yyyy, hh:mm tt"); } else { divLastLogin.Visible = false; } txtIncomingPhLine.Focus(); if (Request.QueryString["dn"] != null) { txtIncomingPhLine.Text = Request.QueryString["dn"]; } if (Request.QueryString["cn"] != null) { txtCallersPhNumber.Text = Request.QueryString["cn"]; } else if (Request.QueryString["amp;cn"] != null) { txtCallersPhNumber.Text = Request.QueryString["amp;cn"]; } if (!string.IsNullOrWhiteSpace(txtCallersPhNumber.Text) && txtCallersPhNumber.Text.Length > 3 && txtCallersPhNumber.Text.IndexOf("000", 0, 3) >= 0) { var configurationSettingRe = IoC.Resolve <IConfigurationSettingRepository>(); var areaCode = Convert.ToString(configurationSettingRe.GetConfigurationValue(ConfigurationSettingName.AreaCode)); if (!string.IsNullOrWhiteSpace(areaCode)) { txtCallersPhNumber.Text = txtCallersPhNumber.Text.Replace(txtCallersPhNumber.Text, areaCode + txtCallersPhNumber.Text.Substring(3)); } } if (IoC.Resolve <ISettings>().EnableCallPop) { ibtnStartCall.Enabled = true; ClientScript.RegisterStartupScript(typeof(string), "jscode_checkStartCall", "CheckOutBoundCall();", true); chkOutBoundCall.Enabled = true; } else if (txtIncomingPhLine.Text != "" && txtCallersPhNumber.Text != "") { ibtnStartCall.Enabled = true; ibtnStartCall.ToolTip = ""; } else { ibtnStartCall.Enabled = true; ClientScript.RegisterStartupScript(typeof(string), "jscode_checkStartCall", "CheckOutBoundCall();", true); chkOutBoundCall.Enabled = true; ibtnStartCall.ToolTip = "Please select Checkbox to start call."; } var callcenterDal = new CallCenterDAL(); List <EScript> scripts = callcenterDal.GetScript(callcenterDal.GetScriptType("Welcome Script", 2)[0].ScriptTypeID.ToString(), 4); scripts[0].ScriptText = scripts[0].ScriptText.Replace("<<Your Name>>", IoC.Resolve <ISessionContext>().UserSession.FullName); //spWelcomeScript.InnerText = scripts[0].ScriptText; // to check if the existing call is in progress if (ExisitingCallId > 0) { hfCallStartTime.Value = new CallCenterCallRepository().GetCallStarttime(ExisitingCallId); ScriptManager.RegisterStartupScript(this.Page, typeof(Int32), "JS", "<script language='javascript'>var hfCallStartTime= document.getElementById('" + hfCallStartTime.ClientID + "'); Call(); </script>", false); } else if (Request.QueryString["dn"] != null && (Request.QueryString["cn"] != null || Request.QueryString["amp;cn"] != null)) { StartCallAutomatically = true; } // Get Dashboard Referesh Time From DB var otherDal = new OtherDAL(); hidRefereshTime.Value = otherDal.GetConfigurationValue("CCRepDashBoardRefereshTime"); } else { if (Request.Params["__EVENTTARGET"] != null && Request.Params["__EVENTTARGET"] == "setCallStartTime") { //Doing Nothing } } BindDropDownControls(); }
private void GetCallDetails(long intCCUserID) { CallCenterDAL objCCRepDAL = new CallCenterDAL(); List <ECall> objCalls = objCCRepDAL.GetCalls(intCCUserID, 1); string totalCall; string averageCall; string maxCall; string minCall; string Recent1 = "-N/A-"; string Recent2 = "-N/A-"; if (objCalls != null && objCalls.Count > 0) { int hours = 0; int min = 0; int sec = 0; int TotalTime = 0; int totalHrs = 0; int totalMin = 0; int totalSec = 0; int avgMin = 0; int avghr = 0; int avgSec = 0; TimeSpan MinDuartion = new TimeSpan(); TimeSpan MaxDuartion = new TimeSpan(); TimeSpan callDuration = new TimeSpan(); totalCall = objCalls[0].TotalCalls.ToString(); string status = objCalls[0].CallStatus.Length > 0 ? objCalls[0].CallStatus : "Interupted"; Recent1 = "Call for " + status + " on " + Convert.ToDateTime(objCalls[0].DateCreated).ToShortDateString() + " at " + Convert.ToDateTime(objCalls[0].DateCreated).ToShortTimeString(); if (objCalls.Count > 1) { status = objCalls[1].CallStatus.Length > 0 ? objCalls[1].CallStatus : "Interupted"; Recent2 = "Call for " + status + " on " + Convert.ToDateTime(objCalls[1].DateCreated).ToShortDateString() + " at " + Convert.ToDateTime(objCalls[1].DateCreated).ToShortTimeString(); } for (int i = 0; i < objCalls.Count; i++) { callDuration = Convert.ToDateTime(objCalls[i].TimeEnd).Subtract(Convert.ToDateTime(objCalls[i].TimeCreated)); hours = hours + Convert.ToInt32(callDuration.Hours.ToString()); min = min + Convert.ToInt32(callDuration.Minutes.ToString()); sec = sec + Convert.ToInt32(callDuration.Seconds.ToString()); if (callDuration > MaxDuartion) { MaxDuartion = callDuration; } if (i == 0) { MinDuartion = callDuration; } if (callDuration < MinDuartion) { MinDuartion = callDuration; } } TotalTime = (hours * 3600) + (min * 60) + sec; totalHrs = TotalTime / 3600; totalMin = (TotalTime % 3600) / 60; totalSec = (TotalTime % 3600) % 60; TotalTime = TotalTime / objCalls.Count; avghr = TotalTime / 3600; avgMin = (TotalTime % 3600) / 60; avgSec = (TotalTime % 3600) % 60; if (avghr > 0) { averageCall = avghr + "." + avgMin + "." + avgSec + "H"; } else { averageCall = avgMin + "." + avgSec + "M"; } if (Convert.ToInt32(MaxDuartion.Hours.ToString()) > 0) { maxCall = MaxDuartion.Hours.ToString() + "." + MaxDuartion.Minutes.ToString() + "." + MaxDuartion.Seconds.ToString() + "H"; } else { maxCall = MaxDuartion.Minutes.ToString() + "." + MaxDuartion.Seconds.ToString() + "M"; } if (Convert.ToInt32(MinDuartion.Hours.ToString()) > 0) { minCall = MinDuartion.Hours.ToString() + "." + MinDuartion.Minutes.ToString() + "." + MinDuartion.Seconds.ToString() + "H"; } else { minCall = MinDuartion.Minutes.ToString() + "." + MinDuartion.Seconds.ToString() + "M"; } } else { averageCall = "-N/A-"; totalCall = "-N/A-"; minCall = "-N/A-"; maxCall = "-N/A-"; } Ucleftpanel1.SetDetails(totalCall, averageCall, maxCall, minCall); Ucleftpanel1.SetRecentCalls(Recent1, Recent2); }