Example #1
0
    /// <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 = "";
    }
Example #2
0
    /// <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 + "'");
    }
Example #3
0
        /// <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();
                }
            }
        }
Example #4
0
        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);
                        }
                    }
                }
            }
        }
        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();
    }