示例#1
0
        private void StartCall(long calledCustomerid)
        {
            var newCall    = new Call();
            var repository = new CallCenterCallRepository();

            if (CallId.HasValue)
            {
                var call = repository.GetById(CallId.Value);

                newCall.CalledInNumber = call.CalledInNumber;
                newCall.CallerNumber   = call.CallerNumber;
                newCall.IsIncoming     = call.IsIncoming;
            }

            newCall.CreatedByOrgRoleUserId = IoC.Resolve <ISessionContext>().UserSession.CurrentOrganizationRole.OrganizationRoleUserId;
            newCall.StartTime        = DateTime.Now;
            newCall.CallDateTime     = DateTime.Now;
            newCall.DateCreated      = DateTime.Now;
            newCall.DateModified     = DateTime.Now;
            newCall.CalledCustomerId = calledCustomerid;

            if (!string.IsNullOrEmpty(Customer.Tag))
            {
                var accountRepository = IoC.Resolve <ICorporateAccountRepository>();
                var account           = accountRepository.GetByTag(Customer.Tag);
                newCall.HealthPlanId = account.Id;
            }

            newCall = repository.Save(newCall);
            CallId  = newCall.Id;
        }
示例#2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ClinicalQuestionTemplateId = 0;
        Page.Title = "Adjust order";
        CallCenter_CallCenterMaster1 obj;

        obj = (CallCenter_CallCenterMaster1)this.Master;
        obj.SetTitle("");


        if (!IsPostBack)
        {
            if (Request.QueryString["Call"] != null && Request.QueryString["Call"] == "No")
            {
                divCall.Style.Add(HtmlTextWriterStyle.Display, "none");
                divCall.Style.Add(HtmlTextWriterStyle.Visibility, "hidden");
            }
            else
            {
                var repository = new CallCenterCallRepository();
                var objCall    = repository.GetCallCenterEntity(ExistingCallId);
                hfCallStartTime.Value = objCall.TimeCreated;
            }
        }

        var eventCustomerRepository = IoC.Resolve <IEventCustomerRepository>();

        if (Request.QueryString["EventCustomerID"] != null)
        {
            EventCustomerId = Convert.ToInt64(Request.QueryString["EventCustomerID"]);
            var eventCustomer = eventCustomerRepository.GetById(EventCustomerId);

            CustomerId = eventCustomer.CustomerId;
            EventId    = eventCustomer.EventId;
        }
        else if (Request.QueryString["EventId"] != null && Request.QueryString["CustomerId"] != null)
        {
            EventId    = Convert.ToInt64(Request.QueryString["EventId"]);
            CustomerId = Convert.ToInt64(Request.QueryString["CustomerId"]);

            EventCustomerId = eventCustomerRepository.Get(EventId, CustomerId).Id;
        }

        if (EventId > 0)
        {
            var corporateAccountRepository = IoC.Resolve <ICorporateAccountRepository>();

            var account = corporateAccountRepository.GetbyEventId(EventId);

            if (account != null)
            {
                if (account.AskClinicalQuestions && account.ClinicalQuestionTemplateId.HasValue)
                {
                    FillClinicialQuestionnaireDiv.Visible = true;
                    ClinicalQuestionTemplateId            = account.ClinicalQuestionTemplateId.Value;
                    GetRecommendationText();
                }
            }
        }
    }
示例#3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["Call"] != null && Request.QueryString["Call"] == "No")
            {
                CallPanel.Visible = false;
            }
            else
            {
                var callCenterCallRepo = new CallCenterCallRepository();
                hfCallStartTime.Value = callCenterCallRepo.GetCallStarttime(CallId);
            }

            var obj = (CallCenter_CallCenterMaster1)Master;

            if (obj != null)
            {
                obj.HideBreadCrum();
            }

            if (IsPostBack)
            {
                if (Request.Form["__EVENTTARGET"] != null)
                {
                    string queryString = Request.Form["__EVENTARGUMENT"];
                    Response.RedirectUser("Details.aspx?Amount=" + queryString + "&guid=" + GuId);
                }
            }
        }
示例#4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Page.Title = "Customer Details";
        CallCenter_CallCenterMaster1 obj;

        obj = (CallCenter_CallCenterMaster1)this.Master;
        obj.SetTitle("Customer Details");

        if (!IsPostBack)
        {
            if (Request.QueryString["Call"] != null && Request.QueryString["Call"] == "No")
            {
                divCall.Style.Add(HtmlTextWriterStyle.Display, "none");
                divCall.Style.Add(HtmlTextWriterStyle.Visibility, "hidden");
                obj.SetBreadCrumbRoot = "<a href=\"/App/CallCenter/CallCenterRep/CallCenterRepCustomerList.aspx?Call=No\">Customer List</a>";
            }
            else
            {
                var repository = new CallCenterCallRepository();
                var objCall    = repository.GetCallCenterEntity(ExistingCallId);
                hfCallStartTime.Value = objCall.TimeCreated;
                obj.SetBreadCrumbRoot = "<a href=\"/App/CallCenter/CallCenterRep/CustomerVerification.aspx\">Customer List</a>";
            }
        }
    }
示例#5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["Call"] != null && Request.QueryString["Call"] == "No")
            {
                CallPanel.Visible = false;
            }
            else
            {
                var callCenterCallRepo = new CallCenterCallRepository();
                hfCallStartTime.Value = callCenterCallRepo.GetCallStarttime(CallId);
            }


            var obj = (CallCenter_CallCenterMaster1)Master;

            if (obj != null)
            {
                obj.HideBreadCrum();
            }

            GiftCertificatePreview.IsCallCenterPurchase = true;
            GiftCertificatePreview.IsOnlinePurchase     = false;
            GiftCertificatePreview.CustomerId           = CustomerId;
            if (CustomerId > 0)
            {
                HeadingText.InnerText = "4";
            }
        }
示例#6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Page.Title = "Callback Prospect";
            var masterPage = Master as CallCenter_CallCenterMaster1;

            if (masterPage != null)
            {
                masterPage.SetBreadCrumbRoot = "";
                masterPage.hideucsearch();
                masterPage.SetTitle("");
            }
            if (!IsPostBack)
            {
                FillDropDown();
                if (Request.QueryString["Call"] != null && Request.QueryString["Call"] == "No")
                {
                    divCall.Style.Add(HtmlTextWriterStyle.Display, "none");
                    divCall.Style.Add(HtmlTextWriterStyle.Visibility, "hidden");
                }
                else
                {
                    var repository = new CallCenterCallRepository();
                    hfCallStartTime.Value = repository.GetCallStarttime(CallId);
                }
                if (CustomerId > 0)
                {
                    var customerRepositoy = IoC.Resolve <ICustomerRepository>();
                    var customer          = customerRepositoy.GetCustomer(CustomerId);
                    FirstNameTextbox.Value          = customer.Name.FirstName;
                    LastNameTextbox.Value           = customer.Name.LastName;
                    PhoneNumberTextbox.Value        = customer.HomePhoneNumber.ToString();
                    EmailTextbox.Value              = customer.Email.ToString();
                    StreetAddressLine1Textbox.Value = customer.Address.StreetAddressLine1;
                    StreetAddressLine2Textbox.Value = customer.Address.StreetAddressLine2;
                    StateTextbox.Value              = customer.Address.State;
                    CityTextbox.Value = customer.Address.City;
                    ZipTextbox.Value  = customer.Address.ZipCode.Zip;
                }
                else if (CurrentProspectCustomerId > 0)
                {
                    var prospectCustomerRepository = IoC.Resolve <IProspectCustomerRepository>();
                    var prospectCustomer           = prospectCustomerRepository.GetProspectCustomer(CurrentProspectCustomerId);
                    FirstNameTextbox.Value   = prospectCustomer.FirstName;
                    LastNameTextbox.Value    = prospectCustomer.LastName;
                    PhoneNumberTextbox.Value = prospectCustomer.CallBackPhoneNumber.ToString();
                    EmailTextbox.Value       = prospectCustomer.Email.ToString();
                    ZipTextbox.Value         = prospectCustomer.Address.ZipCode.Zip;
                }
                else
                {
                    FirstNameTextbox.Value   = FirstName;
                    LastNameTextbox.Value    = LastName;
                    PhoneNumberTextbox.Value = CallBackNumber;
                    ZipTextbox.Value         = Zip;
                }
            }
        }
示例#7
0
        private void EndCall()
        {
            if (CallId == null)
            {
                return;
            }
            var repository = new CallCenterCallRepository();

            repository.UpdateCallEnd(DateTime.Now, CallId.Value);
        }
    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);
    }
示例#9
0
        protected void imgNext_Click(object sender, ImageClickEventArgs e)
        {
            var eventId = Convert.ToInt64(hfEventID.Value);

            EventId = eventId;

            if (!(Request.QueryString["Call"] != null && Request.QueryString["Call"] == "No"))
            {
                if (CallId != null)
                {
                    var repository = new CallCenterCallRepository();
                    repository.UpdateEventforaCall(eventId, CallId.Value);
                }
            }

            if (rbtReportMailY.Checked && Convert.ToInt64(hfResultOrderID.Value) > 0)
            {
                ShippingOptionId = Convert.ToInt64(hfResultOrderID.Value);
                var shippingAddress = ShippingOtion.SaveShippingAddress();
                if (shippingAddress != null)
                {
                    ShippingAddressId = shippingAddress.Id;
                }
                else
                {
                    return;
                }
            }
            else
            {
                RegistrationFlow.ShippingAddressId = 0;
                RegistrationFlow.ShippingOptionId  = 0;
            }
            if (RegistrationFlow == null || RegistrationFlow.ShippingOptionId <= 0)
            {
                Response.RedirectUser("/App/CallCenter/CallCenterRep/AddNotes.aspx?guid=" + GuId);
            }

            if (Request.QueryString["Call"] != null && Request.QueryString["Call"] == "No")
            {
                Response.RedirectUser("SendReportStep3.aspx?Call=No&CustomerID=" + CustomerId + "&guid=" + GuId);
            }
            else
            {
                Response.RedirectUser("SendReportStep3.aspx?guid=" + GuId);
            }
            //Response.RedirectUser("SendReportStep3.aspx");
        }
    protected void Page_Load(object sender, EventArgs e)
    {
        Page.Title = "Add Primary Care Physician";
        var obj = (CallCenter_CallCenterMaster1)Master;

        if (CustomerType == CustomerType.Existing)
        {
            obj.SetTitle("Existing Customer");
            _pCustomerType.InnerText = "Add Primary Care Physician";
        }
        else
        {
            obj.SetTitle("Register New Customer");
            _pCustomerType.InnerText = "Add Primary Care Physician";
        }

        obj.SetBreadCrumbRoot = "<a href=\"/CallCenter/CallCenterRepDashboard/Index\">Dashboard</a>";

        obj.hideucsearch();

        rbtnYes.Attributes["onClick"] = "return ShowPcP()";
        rbtnNo.Attributes["onClick"]  = "return HidePcp()";
        if (rbtnYes.Checked)
        {
            divPcp.Visible          = true;
            divPcp.Style["display"] = "block";
        }

        if (!IsPostBack)
        {
            if (Request.QueryString["Call"] != null && Request.QueryString["Call"] == "No")
            {
                divCall.Style.Add(HtmlTextWriterStyle.Display, "none");
                divCall.Style.Add(HtmlTextWriterStyle.Visibility, "hidden");
            }
            else
            {
                var repository = new CallCenterCallRepository();
                hfCallStartTime.Value = repository.GetCallStarttime(CallId);
            }

            FillPcpInfo();
            UpdateCallQueueCustomers();
        }
    }
示例#11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (NotInCall)
            {
                CallPanel.Visible = false;
            }
            else
            {
                var callCenterCallRepo = new CallCenterCallRepository();
                hfCallStartTime.Value = callCenterCallRepo.GetCallStarttime(CallId);
            }

            var obj = (CallCenter_CallCenterMaster1)Master;

            if (obj != null)
            {
                obj.HideBreadCrum();
            }
        }
示例#12
0
        private void SetPageReDirection()
        {
            string redirecturl = ViewState["ReferredQuery"].ToString();

            if (CurrentRole == Roles.CallCenterRep)
            {
                if (!(Request.QueryString["Call"] != null && Request.QueryString["Call"].ToLower() == "no"))
                {
                    if (CallId.HasValue)
                    {
                        var repository = new CallCenterCallRepository();
                        var call       = repository.GetCallCenterEntity(CallId.Value);
                        EndCall();
                        StartCall(call.CalledCustomerID);
                    }
                }
            }
            Response.RedirectUser(redirecturl);
        }
    protected void Page_Load(object sender, EventArgs e)
    {
        this.Title = "Edit Customer";
        var objMaster = (CallCenter_CallCenterMaster1)this.Master;

        if (SystemRoleId == (long)Roles.CallCenterRep)
        {
            objMaster.SetBreadCrumbRoot = "<a href=\"/CallCenter/CallCenterRepDashboard/Index\">DashBoard</a>";
        }
        else if (SystemRoleId == (long)Roles.CallCenterManager)
        {
            objMaster.SetBreadCrumbRoot = "<a href=\"/App/CallCenter/CallCenterManagerDashBoard.aspx\">DashBoard</a>";
        }

        objMaster.SetTitle("Customer Profile");
        if (!IsPostBack)
        {
            if (Request.QueryString["Call"] != null && Request.QueryString["Call"] == "No")
            {
                divCall.Style.Add(HtmlTextWriterStyle.Display, "none");
                divCall.Style.Add(HtmlTextWriterStyle.Visibility, "hidden");
            }
            else
            {
                var repository = new CallCenterCallRepository();
                var objCall    = repository.GetCallCenterEntity(ExistingCallId);
                hfCallStartTime.Value = objCall.TimeCreated;
            }

            if (Request.QueryString["UserID"] != null)
            {
                UCEditCustomer1.UserID = Convert.ToInt32(Request.QueryString["UserID"]);
            }
            else if (Request.QueryString["CustomerID"] != null)
            {
                var otherDal = new OtherDAL();
                UCEditCustomer1.UserID = Convert.ToInt32(otherDal.GetUid(Convert.ToInt32(Request.QueryString["CustomerID"])));
            }
        }
    }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request.QueryString["Call"] != null && Request.QueryString["Call"] == "No")
                {
                    divCall.Style.Add(HtmlTextWriterStyle.Display, "none");
                    divCall.Style.Add(HtmlTextWriterStyle.Visibility, "hidden");
                }
                else
                {
                    var repository = new CallCenterCallRepository();
                    var objCall    = repository.GetCallCenterEntity(ExistingCallId);
                    hfCallStartTime.Value = objCall.TimeCreated;
                }
            }

            CallCenter_CallCenterMaster1 obj;

            obj = (CallCenter_CallCenterMaster1)this.Master;
            obj.SetTitle("");
        }
    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);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        Page.Title = "CallCenterRep Login Issues";
        CallCenter_CallCenterMaster1 obj;

        obj = (CallCenter_CallCenterMaster1)this.Master;
        obj.SetTitle("CallCenterRep Login Issues");
        obj.SetBreadCrumbRoot = "<a href=\"/CallCenter/CallCenterRepDashboard/Index\">Dashboard</a>";
        if (!IsPostBack)
        {
            var callCenterCallRepo = new CallCenterCallRepository();

            hfCallStartTime.Value = callCenterCallRepo.GetCallStarttime(CallId);
            if (ViewState["UrlReferer"] == null)
            {
                if (Request.UrlReferrer != null)
                {
                    ViewState["UrlReferer"] = Request.UrlReferrer.PathAndQuery;
                }
            }

            SetCustomerDetails();
        }
    }
示例#17
0
        protected void Page_Load(object sender, EventArgs e)
        {
            RegistrationFlow.CanSaveConsentInfo = false;
            if (Request.QueryString["guid"] == null || Request.QueryString["guid"] == string.Empty)
            {
                Response.RedirectUser("/CallCenter/CallCenterRepDashboard/Index");
            }

            SetDisplayControls();
            SetJavaScriptEvents();
            if (!IsPostBack)
            {
                var   repository = new CallCenterCallRepository();
                ECall objCall    = repository.GetCallCenterEntity(ExistingCallId);
                if (objCall != null && (!string.IsNullOrWhiteSpace(objCall.CallersPhoneNumber) || !string.IsNullOrWhiteSpace(objCall.CallBackNumber)))
                {
                    var commonCode = new CommonCode();
                    txtCallBackNo.Text = commonCode.FormatPhoneNumber(string.IsNullOrWhiteSpace(objCall.CallersPhoneNumber) ? objCall.CallBackNumber : objCall.CallersPhoneNumber);
                }

                hfCallStartTime.Value = objCall.TimeCreated;
                if ((Request.UrlReferrer != null) && Request.UrlReferrer.LocalPath == "/App/CallCenter/CallCenterRep/CustomerVerification.aspx")
                {
                    if (CurrentProspectCustomerId > 0)
                    {
                        SetProspectCustomerDataToControls();
                    }
                    if (RegistrationFlow != null)
                    {
                        txtSourceCode.Text = RegistrationFlow.CallSourceCode;
                    }
                    if (Request.QueryString["CustomerId"] != null)
                    {
                        txtCustomerID.Text = Request.QueryString["CustomerId"];
                    }
                }
                else if (Request.UrlReferrer != null && Request.UrlReferrer.LocalPath == "/App/CallCenter/CallCenterRep/AddNotes.aspx")
                {
                    if (CurrentProspectCustomerId > 0)
                    {
                        SetProspectCustomerDataToControls();
                        CurrentProspectCustomerId = 0;
                        txtFirstName.Text         = "";
                    }
                }
                else if (CurrentProspectCustomerId > 0)
                {
                    SetProspectCustomerDataToControls();
                }

                if (RegistrationFlow != null)
                {
                    RegistrationFlow.CallSourceCode     = string.Empty;
                    RegistrationFlow.SourceCode         = string.Empty;
                    RegistrationFlow.SourceCodeId       = 0;
                    RegistrationFlow.SourceCodeAmount   = 0;
                    RegistrationFlow.TestIds            = null;
                    RegistrationFlow.PackageId          = 0;
                    RegistrationFlow.AppointmentSlotIds = null;
                    RegistrationFlow.ShippingDetailId   = 0;
                    RegistrationFlow.ShippingOptionId   = 0;
                    RegistrationFlow.ShippingAddressId  = 0;
                    RegistrationFlow.ProductId          = 0;
                    RegistrationFlow.PackageCost        = 0;
                    RegistrationFlow.TotalAmount        = 0;
                }
            }

            if (Request.Params["__EVENTTARGET"] != null && Request.Params["__EVENTTARGET"] == "Search")
            {
                SearchCustomer();
            }
        }
示例#18
0
        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);
                }
            }
        }
示例#19
0
        protected void imgNext_Click(object sender, ImageClickEventArgs e)
        {
            var orderRepository = IoC.Resolve <IOrderRepository>();
            var order           = orderRepository.GetOrderByEventCustomerId(Convert.ToInt64(hfEventcustomerID.Value));
            var orderDetail     = order.OrderDetails.SingleOrDefault(od => (od.DetailType == OrderItemType.EventPackageItem || od.DetailType == OrderItemType.EventTestItem) &&
                                                                     od.EventCustomerOrderDetail != null && od.EventCustomerOrderDetail.IsActive && od.IsCompleted);

            var shippingDetailRepository = IoC.Resolve <IShippingDetailRepository>();

            var resultShippingDetails = shippingDetailRepository.GetShippingDetailsForCancellation(orderDetail.Id);
            var cdShippingDetails     = shippingDetailRepository.GetProductShippingDetailsForCancellation(orderDetail.Id);

            resultShippingDetails = resultShippingDetails.Where(sd => sd.Status == ShipmentStatus.Processing).Select(sd => sd).ToArray();
            //cdShippingDetails = cdShippingDetails.Where(sd => sd.Status == ShipmentStatus.Processing).Select(sd => sd).ToArray();


            if (Convert.ToInt64(hfResultOrderID.Value) > 0 && resultShippingDetails.Count() > 0)//&& (cdShippingDetails == null || (cdShippingDetails.Count() < resultShippingDetails.Count()))
            {
                ErrorDiv.InnerText = "There is already an unprocessed shipping request in your order. Duplicate shipping cannot be added till this shipping request is processed. Proceed with the default selection to add a product or contact your admin.";
                ErrorDiv.Style.Add(HtmlTextWriterStyle.Display, "block");
                return;
            }
            if (Convert.ToInt64(hfResultOrderID.Value) <= 0 && !cdShippingDetails.IsNullOrEmpty() && resultShippingDetails.Count() == 0)
            {
                ErrorDiv.InnerText = "To send an additional copy of Images to the customer, you need to select any one of the shipping options.";
                ErrorDiv.Style.Add(HtmlTextWriterStyle.Display, "block");
                return;
            }

            var eventId = Convert.ToInt64(hfEventID.Value);

            EventId = eventId;

            if (!(Request.QueryString["Call"] != null && Request.QueryString["Call"] == "No"))
            {
                if (CallId != null)
                {
                    var repository = new CallCenterCallRepository();
                    repository.UpdateEventforaCall(eventId, CallId.Value);
                }
            }

            if (ProductOption.IsProductSelected && ProductOption.ProductId > 0)
            {
                ProductId = ProductOption.ProductId;
            }
            else
            {
                ProductId = null;
            }

            if (Convert.ToInt64(hfResultOrderID.Value) > 0)
            {
                var address = ResultOtion.SaveShippingAddress();
                ShippingAddressId = address.Id;
                ShippingOptionId  = Convert.ToInt64(hfResultOrderID.Value);
            }
            else
            {
                ShippingAddressId = null;
                ShippingOptionId  = null;
            }

            if (ProductId == null)
            {
                if (CurrentOrgRole.CheckRole((long)Roles.Technician) || CurrentOrgRole.CheckRole((long)Roles.NursePractitioner) || CurrentOrgRole.CheckRole((long)Roles.FranchisorAdmin))
                {
                    Response.RedirectUser(ViewState["UrlReferer"].ToString());
                }
                Response.RedirectUser("/App/CallCenter/CallCenterRep/AddNotes.aspx?guid=" + GuId);
            }
            else
            {
                if (CurrentOrgRole.CheckRole((long)Roles.Technician) || CurrentOrgRole.CheckRole((long)Roles.NursePractitioner) || CurrentOrgRole.CheckRole((long)Roles.FranchisorAdmin))
                {
                    Session["c_url"] = ViewState["UrlReferer"].ToString();
                    Response.RedirectUser("/App/Franchisee/Technician/MakePaymentforAddonProduct?id=" + CustomerId + "&guid=" + GuId);
                }

                if (Request.QueryString["Call"] != null && Request.QueryString["Call"] == "No")
                {
                    Response.RedirectUser("SendReportStep3.aspx?Call=No&CustomerID=" + CustomerId + "&guid=" + GuId);
                }
                else
                {
                    Response.RedirectUser("SendReportStep3.aspx?guid=" + GuId);
                }
            }
        }
示例#20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            RegistrationFlow.CanSaveConsentInfo = false;
            SetTitle();
            bool defaultBasePackage = false;

            FillClinicialQuestionnaireDiv.Visible = false;
            ClinicalQuestionTemplateId            = 0;
            IsClinicalQuestionaireFilled          = false;


            if (EventId > 0)
            {
                if (EventData != null)
                {
                    EventType = EventData.EventType;

                    var configurationSettingRepository = IoC.Resolve <IConfigurationSettingRepository>();
                    EnableAlaCarte = Convert.ToBoolean(configurationSettingRepository.GetConfigurationValue(ConfigurationSettingName.EnableAlaCarte));
                    if (EnableAlaCarte)
                    {
                        EnableAlaCarte = EventData.EnableAlaCarteCallCenter;
                    }
                }

                if (AccountByEventId != null)
                {
                    if (AccountByEventId.AskClinicalQuestions && AccountByEventId.ClinicalQuestionTemplateId.HasValue)
                    {
                        FillClinicialQuestionnaireDiv.Visible = true;
                        ClinicalQuestionTemplateId            = AccountByEventId.ClinicalQuestionTemplateId.Value;
                        GetRecommendationText();
                    }
                    defaultBasePackage = AccountByEventId.DefaultSelectionBasePackage;

                    // for penguin integartion
                    var settings = IoC.Resolve <ISettings>();

                    QuestionnaireType questionnaireType = QuestionnaireType.None;
                    if (AccountByEventId != null && AccountByEventId.IsHealthPlan && EventData != null)
                    {
                        var accountHraChatQuestionnaireHistoryServices = IoC.Resolve <IAccountHraChatQuestionnaireHistoryServices>();
                        questionnaireType = accountHraChatQuestionnaireHistoryServices.QuestionnaireTypeByAccountIdandEventDate(AccountByEventId.Id, EventData.EventDate);
                    }

                    if (questionnaireType == QuestionnaireType.HraQuestionnaire)
                    {
                        var userSession = IoC.Resolve <ISessionContext>().UserSession;
                        var token       =
                            (Session.SessionID + "_" + userSession.UserId + "_" +
                             userSession.CurrentOrganizationRole.RoleId + "_" +
                             userSession.CurrentOrganizationRole.OrganizationId).Encrypt();


                        HraQuestionerAppUrlWithoutVisit = settings.HraQuestionerAppUrl + "?userToken=" +
                                                          HttpUtility.UrlEncode(token) + "&customerId=" + CustomerId + "&orgName=" +
                                                          settings.OrganizationNameForHraQuestioner + "&tag=" + AccountByEventId.Tag;
                        HraQuestionerAppUrl = HraQuestionerAppUrlWithoutVisit + "&visitId=" + (RegistrationFlow.AwvVisitId.HasValue ? RegistrationFlow.AwvVisitId.Value : 0);

                        ChatQuestionerAppUrl = string.Empty;
                    }
                    else if (questionnaireType == QuestionnaireType.ChatQuestionnaire)
                    {
                        ChatQuestionerAppUrl = settings.HraQuestionerAppUrl;
                        HraQuestionerAppUrl  = string.Empty;
                    }
                }
            }


            if (!IsPostBack)
            {
                if (RegistrationFlow != null && RegistrationFlow.IsRetest)
                {
                    RetestNo.Checked  = false;
                    RetestYes.Checked = true;
                }
                else
                {
                    RetestNo.Checked  = true;
                    RetestYes.Checked = false;
                }

                if (RegistrationFlow != null && RegistrationFlow.SingleTestOverride)
                {
                    SingleTestOverrideYes.Checked = true;
                    SingleTestOverrideNo.Checked  = false;
                }
                else
                {
                    SingleTestOverrideYes.Checked = false;
                    SingleTestOverrideNo.Checked  = true;
                }

                if (EventId != 0)
                {
                    // Hack: This is  done if the user hits back button on payment page, to get back to select package page.
                    if (SourceCodeId > 0 && !string.IsNullOrEmpty(SourceCode))
                    {
                        txtCouponCode.Text = SourceCode;
                    }
                    else if (RegistrationFlow != null)
                    {
                        txtCouponCode.Text = RegistrationFlow.CallSourceCode;
                    }

                    hfEventID.Value = EventId.ToString();

                    var eventCustomerQuestionAnswerService = IoC.Resolve <IEventCustomerQuestionAnswerService>();
                    hfQuestionAnsTestId.Value = eventCustomerQuestionAnswerService.GetQuestionAnswerTestIdString(CustomerId, EventId);
                }
                else
                {
                    const string message = "Sorry, Event detail not found. <a href=\"RegCustomerSearchEvent.aspx\">Click here</a> to search event again ";
                    DisplayErrorMessage(message);
                }

                if (CurrentProspectCustomer != null && CurrentProspectCustomer.Id > 0 && CurrentProspectCustomer.SourceCodeId != null && CurrentProspectCustomer.SourceCodeId.Value > 0)
                {
                    ISourceCodeRepository sourceCodeRepository = new SourceCodeRepository();
                    var sourceCode = sourceCodeRepository.GetSourceCodeById(CurrentProspectCustomer.SourceCodeId.Value);
                    if (sourceCode != null)
                    {
                        txtCouponCode.Text = sourceCode.CouponCode;
                    }
                }
                IEventPackageRepository packageRepository = new EventPackageRepository();
                var preApprovedPackageRepository          = IoC.Resolve <IPreApprovedPackageRepository>();

                if (AccountByEventId != null && AccountByEventId.AllowPreQualifiedTestOnly)
                {
                    long preApprovedPackageId = preApprovedPackageRepository.CheckPreApprovedPackages(CustomerId);
                    if (PackageId == 0 && preApprovedPackageId > 0 && (RegistrationFlow == null || !RegistrationFlow.SingleTestOverride) && (RegistrationFlow == null || string.IsNullOrEmpty(RegistrationFlow.DisqualifiedTest)))
                    {
                        var eventPackages = packageRepository.GetPackagesForEventByRole(EventId, (long)Roles.CallCenterRep);

                        if (!eventPackages.IsNullOrEmpty())
                        {
                            var preApprovedPackage = eventPackages.FirstOrDefault(x => x.PackageId == preApprovedPackageId);
                            if (preApprovedPackage != null)
                            {
                                PackageId = preApprovedPackage.PackageId;
                                TestIds   = preApprovedPackage.Tests.Select(t => t.TestId).ToList();
                            }
                        }
                    }
                }


                if (defaultBasePackage && PackageId == 0 && (RegistrationFlow == null || !RegistrationFlow.SingleTestOverride) && (RegistrationFlow == null || string.IsNullOrEmpty(RegistrationFlow.DisqualifiedTest)))
                {
                    var eventPackages = packageRepository.GetPackagesForEventByRole(EventId, (long)Roles.CallCenterRep)
                                        .OrderBy(p => p.Price);
                    if (!eventPackages.IsNullOrEmpty())
                    {
                        var lowestPricePackage = eventPackages.First();
                        PackageId = lowestPricePackage.PackageId;
                        TestIds   = lowestPricePackage.Tests.Select(t => t.TestId).ToList();
                    }
                }

                if (RegistrationFlow != null && !string.IsNullOrWhiteSpace(RegistrationFlow.DisqualifiedTest) && string.IsNullOrWhiteSpace(hfDisqualifedTest.Value))
                {
                    hfDisqualifedTest.Value = RegistrationFlow.DisqualifiedTest;
                }

                if (RegistrationFlow != null && !string.IsNullOrWhiteSpace(RegistrationFlow.QuestionIdAnswerTestId) && string.IsNullOrWhiteSpace(hfQuestionAnsTestId.Value))
                {
                    hfQuestionAnsTestId.Value = RegistrationFlow.QuestionIdAnswerTestId;
                }

                /*if (!DisqualifiedTestIds.IsNullOrEmpty())
                 * {
                 *  TestIds = TestIds.Where(x => !DisqualifiedTestIds.Contains(x)).ToList();
                 * }*/

                ItemCartControl.EventId   = EventId;
                ItemCartControl.RoleId    = (long)Roles.CallCenterRep;
                ItemCartControl.PackageId = PackageId;
                ItemCartControl.TestIds   = TestIds;

                if (Request.QueryString["Call"] != null && Request.QueryString["Call"] == "No")
                {
                    divCall.Style.Add(HtmlTextWriterStyle.Display, "none");
                    divCall.Style.Add(HtmlTextWriterStyle.Visibility, "hidden");
                }
                else
                {
                    var repository = new CallCenterCallRepository();
                    hfCallStartTime.Value = repository.GetCallStarttime(CallId);
                }

                if (Request.UrlReferrer != null)
                {
                    ViewState["UrlReferer"] = Request.UrlReferrer.PathAndQuery;
                }
            }
            if (Request.Params["__EVENTTARGET"] == "NextButton" && Request.Params["__EVENTARGUMENT"] == "Click")
            {
                NextButtonClick();
            }
        }
示例#21
0
        protected void lnkCallType_Click(object sender, EventArgs e)
        {
            var lnkSender  = (LinkButton)sender;
            var repository = new CallCenterCallRepository();

            switch (lnkSender.CommandName)
            {
            case "Issues":
                repository.UpdateCallCenterCallStatus(CallType.Login_Issue.ToString().Replace("_", " "), ExistingCallId);
                Response.RedirectUser("CallCenterRepLoginIssues.aspx?CustomerID=" + CustomerId + "&Name=" + Request.QueryString["Name"] + "&guid=" + GuId);
                break;

            case "RequestReport":
                repository.UpdateCallCenterCallStatus(CallType.Request_Print_Version.ToString().Replace("_", " "), ExistingCallId);
                Response.RedirectUser("RequestReport/SendReportStep2.aspx?guid=" + GuId);
                break;

            case "ExistingCustomer":
                repository.UpdateCallCenterCallStatus(CallType.Review_Customer.ToString().Replace("_", " "), ExistingCallId);
                Session["ParameterString"] = null;
                Response.RedirectUser("CallCenterRepCustomerDetails.aspx?CustomerID=" + CustomerId + "&guid=" + GuId);
                break;

            case "RegisterCustomer":
                repository.UpdateCallCenterCallStatus(CallType.Register_New_Customer.ToString().Replace("_", " "), ExistingCallId);

                if (RegistrationFlow != null)
                {
                    RegistrationFlow.SourceCodeId       = 0;
                    RegistrationFlow.SourceCodeAmount   = 0;
                    RegistrationFlow.SourceCode         = string.Empty;
                    RegistrationFlow.TestIds            = null;
                    RegistrationFlow.PackageId          = 0;
                    RegistrationFlow.AppointmentSlotIds = null;
                    RegistrationFlow.ShippingDetailId   = 0;
                }

                if (ProspectCustomerId > 0 && (RegistrationFlow == null || RegistrationFlow.CustomerId == 0))
                {
                    BindCurrentCallToProspectCustomer();
                }

                Response.RedirectUser("/App/CallCenter/CallCenterRep/ExistingCustomer/RegCustomerSearchEvent.aspx?CustomerType=New&FirstName=" + FirstName + "&LastName=" + LastName + "&CallBackNo=" + CallBackNumber + "&Zip=" + Zip + "&guid=" + GuId);

                //Response.RedirectUser("/App/CallCenter/CallCenterRep/ExistingCustomer/ExistingCustomer.aspx?CustomerType=New&FirstName=" + FirstName + "&LastName=" + LastName + "&CallBackNo=" + CallBackNumber + "&Zip=" + Zip);
                break;

            case "OtherIssues":
                repository.UpdateCallCenterCallStatus(CallType.Other_Issues.ToString().Replace("_", " "), ExistingCallId);
                Response.RedirectUser("AddNotes.aspx?guid=" + GuId);
                break;

            case "ExistingCustomerRegister":
                repository.UpdateCallCenterCallStatus(CallType.Existing_Customer.ToString().Replace("_", " "), ExistingCallId);
                UpdateProspectCustomer();
                BindCurrentCallToProspectCustomer();
                Response.RedirectUser(ResolveUrl("/App/CallCenter/CallCenterRep/ExistingCustomer/RegCustomerSearchEvent.aspx?CustomerType=Existing&CustomerID=" +
                                                 CustomerId + "&Name=" + Request.QueryString["Name"] + "&guid=" + GuId));

                //Response.RedirectUser(ResolveUrl("/App/CallCenter/CallCenterRep/ExistingCustomer/ExistingCustomer.aspx?CustomerType=Existing&CustomerID=" +
                //    Request.QueryString["CustomerID"] + "&Name=" + Request.QueryString["Name"]));
                break;

            case "GiftCertificate":
                repository.UpdateCallCenterCallStatus(CallType.Gift_Certificate.ToString().Replace("_", " "), ExistingCallId);

                Response.RedirectUser(ResolveUrl("/App/CallCenter/CallCenterRep/GiftCertificate/Catalog.aspx?guid=" + GuId));
                break;

            case "AddOnProduct":
                Response.RedirectUser("RequestReport/AdditionalProductRequest.aspx?guid=" + GuId);
                break;
            }
        }
示例#22
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);
                        }
                    }
                }
            }
        }
示例#23
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //Get the customer detail
        Page.Title = "Report Status";
        CallCenter_CallCenterMaster1 obj;

        obj = (CallCenter_CallCenterMaster1)this.Master;
        obj.SetTitle("Report Status");
        obj.SetBreadCrumbRoot = "<a href=\"/CallCenter/CallCenterRepDashboard/Index\">Dashboard</a>";

        obj.hideucsearch();
        if (!IsPostBack)
        {
            var   repository = new CallCenterCallRepository();
            ECall objCall    = repository.GetCallCenterEntity(ExistingCallId);
            hfCallStartTime.Value = objCall.TimeCreated;

            if (CustomerId.HasValue && Customer != null)
            {
                spnCustomerName.InnerText = Customer.NameAsString;
                string strCustAddress = CommonClass.FormatAddress(Customer.Address.StreetAddressLine1,
                                                                  Customer.Address.StreetAddressLine2,
                                                                  Customer.Address.City,
                                                                  Customer.Address.State,
                                                                  Customer.Address.ZipCode.Zip);
                spnAddress.InnerHtml = strCustAddress;
                spnEmail.InnerText   = Customer.Email != null?Customer.Email.ToString() : string.Empty;


                var           masterDal     = new MasterDAL();
                List <EEvent> customerEvent = masterDal.GetCustomerEvent(CustomerId.Value.ToString(), 1);

                DataTable tbltemp = new DataTable();
                tbltemp.Columns.Add("Id");
                tbltemp.Columns.Add("Name");
                tbltemp.Columns.Add("Date");
                tbltemp.Columns.Add("City");
                tbltemp.Columns.Add("AppTime");
                tbltemp.Columns.Add("Package");
                tbltemp.Columns.Add("PaymentMethod");
                tbltemp.Columns.Add("Status");
                tbltemp.Columns.Add("EventCustomerID");
                tbltemp.Columns.Add("HostName");
                tbltemp.Columns.Add("HostAddress");

                if (customerEvent != null)
                {
                    for (Int32 intCounter = 0; intCounter < customerEvent.Count; intCounter++)
                    {
                        string strEventDate =
                            Convert.ToDateTime(customerEvent[intCounter].EventDate).ToString("MMM dd yyyy");

                        string strAppointmentStartTime =
                            Convert.ToDateTime(customerEvent[intCounter].Customer[0].EventAppointment.StartTime).
                            ToString("hh:mm tt");
                        string strAppointmentEndTime =
                            Convert.ToDateTime(customerEvent[intCounter].Customer[0].EventAppointment.EndTime).ToString(
                                "hh:mm tt");
                        string strAppointmentTime = strAppointmentStartTime + " - " +
                                                    strAppointmentEndTime;
                        string strPackage      = customerEvent[intCounter].Customer[0].EventPackage.Package.PackageName;
                        string strReportStatus = customerEvent[intCounter].Customer[0].Interpreted.ToString();
                        string strPayMethod    = customerEvent[intCounter].Customer[0].PaymentDetail.PaymentType.Name;

                        tbltemp.Rows.Add(new object[]
                        {
                            customerEvent[intCounter].EventID, customerEvent[intCounter].Name,
                            strEventDate, customerEvent[intCounter].Host.Address.City,
                            strAppointmentTime, strPackage, strPayMethod, strReportStatus,
                            customerEvent[intCounter].Customer[0].CustomerEventTestID,
                            customerEvent[intCounter].Host.Name, "HostAddress"
                        });
                    }

                    dgeventhistory.DataSource = tbltemp;
                    ViewState["DSGRID"]       = tbltemp;
                    dgeventhistory.DataBind();


                    dbsearch.Visible          = true;
                    dbsearch.Style["display"] = "";
                }
                else
                {
                    dbsearch.Visible          = false;
                    dbsearch.Style["display"] = "";

                    dgeventhistory.Visible   = false;
                    dvSearchResult.InnerText = "No Result found";
                }
            }
        }
    }
 protected void imgbtnResolved_Click(object sender, ImageClickEventArgs e)
 {
     if (ViewState["Case1"] != null)
     {
         DisplayInfoDiv(true);
         divMail.InnerText  = "The Login Issue has been resolved successfully";
         ViewState["Case1"] = null;
     }
     else if (ViewState["Case2"] != null)
     {
         //string resetPwdQueryString = SetPassword(ViewState["Case2"].ToString());
         bool mailsentUserName = SendParsedMailUserName();
         bool mailsentPassword = SendParsedMailPassword();
         if (mailsentUserName == true && mailsentPassword == true)
         {
             divMail.InnerText = "The Login Issue has been resolved successfully.The User Name & Reset Password Link has been sent to Customer's email.";
             DisplayInfoDiv(true);
         }
         ViewState["Case2"] = null;
     }
     else if (ViewState["Case3"] != null)
     {
         SetPassword(ViewState["Case3"].ToString());
         DisplayInfoDiv(true);
         divMail.InnerText = "The Login Issue has been resolved successfully";
     }
     else if (ViewState["Case4"] != null)
     {
         //string resetPwdQueryString = SetPassword(ViewState["Case4"].ToString());
         bool mailsentUserName = SendParsedMailUserName();
         bool mailsentPassword = SendParsedMailPassword();
         if (mailsentUserName == true && mailsentPassword == true)
         {
             divMail.InnerText = "The Login Issue has been resolved successfully.The User Name &  Reset Password Link has been sent to Customer's email.";
             DisplayInfoDiv(true);
         }
     }
     else if (ViewState["Case5"] != null)
     {
         DisplayInfoDiv(true);
         divMail.InnerText = "The Login Issue has been resolved successfully";
     }
     else if (ViewState["Case6"] != null)
     {
         bool mailsentUserName = SendParsedMailUserName();
         if (mailsentUserName)
         {
             divMail.InnerText = "The Login Issue has been resolved successfully.The User Name has been sent to Customer's email.";
             DisplayInfoDiv(true);
         }
     }
     else if (ViewState["Case7"] != null)
     {
         DisplayInfoDiv(true);
         divMail.InnerText = "The Login Issue has been resolved successfully";
     }
     else if (ViewState["Case8"] != null)
     {
         bool mailsentUserName = SendParsedMailUserName();
         if (mailsentUserName)
         {
             divMail.InnerText = "The Login Issue has been resolved successfully.The User Name has been sent to Customer's email.";
             DisplayInfoDiv(true);
         }
     }
     else if (ViewState["Case9"] != null)
     {
         DisplayInfoDiv(true);
         divMail.InnerText = "The Login Issue has been resolved successfully";
     }
     else if (ViewState["Case10"] != null)
     {
         //string resetPwdQueryString = SetPassword(ViewState["Case10"].ToString());
         bool mailsentPassword = SendParsedMailPassword();
         if (mailsentPassword)
         {
             divMail.InnerText = "The Login Issue has been resolved successfully.The Reset Password Link has been sent to Customer's email.";
             DisplayInfoDiv(true);
         }
     }
     else if (ViewState["Case11"] != null)
     {
         SetPassword(ViewState["Case11"].ToString());
         DisplayInfoDiv(true);
         divMail.InnerText = "The Login Issue has been resolved successfully";
     }
     else if (ViewState["Case12"] != null)
     {
         //string resetPwdQueryString = SetPassword(ViewState["Case12"].ToString());
         bool mailsentPassword = SendParsedMailPassword();
         if (mailsentPassword == true)
         {
             divMail.InnerText = "The Login Issue has been resolved successfully.The Reset Password Link has been sent to Customer's email.";
             DisplayInfoDiv(true);
         }
     }
     else if (ViewState["Case13"] != null)
     {
         DisplayInfoDiv(true);
         divMail.InnerText = "The Login Issue has been resolved successfully";
     }
     else if (ViewState["Case14"] != null)
     {
         DisplayInfoDiv(true);
         divMail.InnerText = "The Login Issue has been resolved successfully";
     }
     else if (ViewState["Case15"] != null)
     {
         DisplayInfoDiv(true);
         divMail.InnerText = "The Login Issue has been resolved successfully";
     }
     else if (ViewState["Case16"] != null)
     {
         DisplayInfoDiv(true);
         divMail.InnerText = "The Login Issue has been resolved successfully";
     }
     else if (ViewState["Case17"] != null)
     {
         DisplayInfoDiv(true);
         divMail.InnerText = "The Login Issue has been resolved successfully";
     }
     if (!(Request.QueryString["Call"] != null && Request.QueryString["Call"] == "No"))
     {
         var repository = new CallCenterCallRepository();
         var call       = repository.GetCallCenterEntity(CallId);
         EndCall();
         StartCall(call.CalledCustomerID);
     }
     Response.RedirectUser("CustomerOptions.aspx?CustomerID=" + Request.QueryString["CustomerID"] + "&Name=" + Request.QueryString["Name"] + "&guid=" + GuId);
 }