public ActionResult ChangeAppointment(long callQueueCustomerId, long callId, long attemptId, long eventId) { var guid = Guid.NewGuid().ToString(); var callQueueCustomer = _callQueueCustomerRepository.GetById(callQueueCustomerId); var registrationFlow = new RegistrationFlowModel { GuId = guid, CallId = callId, CallQueueCustomerId = callQueueCustomerId, CustomerId = callQueueCustomer.CustomerId.HasValue ? callQueueCustomer.CustomerId.Value : 0, AttempId = attemptId, EventId = eventId }; Session[guid] = registrationFlow; if (registrationFlow.CustomerId > 0) { string redirectUrl = _settings.AppUrl + "/App/CallCenter/CallCenterRep/CallCenterRepRescheduleCustomerAppointment.aspx?Call=Yes&EventCustomerID=" + callQueueCustomer.EventCustomerId + "&CustomerID=" + registrationFlow.CustomerId + "&EventID=" + eventId + "&callQueueCustomerId=" + callQueueCustomerId + "&attemptId=" + attemptId + "&guid=" + guid; Response.RedirectUser(redirectUrl); return(null); } return(null); }
protected void Page_Load(object sender, EventArgs e) { var customerMasterPage = (Customer_CustomerMaster)Master; customerMasterPage.SetBreadcrumb = "<a href=\"/App/Customer/HomePage.aspx\">Home</a>"; customerMasterPage.SetPageView("DashBoard"); if (Session["LastLoginTime"] != null && !string.IsNullOrEmpty(Session["LastLoginTime"].ToString().Trim())) { spLastLogin.InnerText = "Last login: "******"LastLoginTime"].ToString()).ToString("MMMM dd, yyyy, hh:mm tt"); } else { divLastLogin.Visible = false; } ShippingDetailControl.ShowFreeOption = false; ShippingDetailControl.ShowOnlineOption = true; ProductOption.IsProductSelected = true; ProductOption.IsProductCheckboxEnabled = false; if (!IsPostBack) { if (string.IsNullOrEmpty(Request.QueryString["guid"])) { hfGuId.Value = Guid.NewGuid().ToString(); var registrationFlow = new RegistrationFlowModel { GuId = hfGuId.Value }; RegistrationFlow = registrationFlow; } } }
public ActionResult StartCall(string cn, string dn, bool isInbound) { var call = new Call { CreatedByOrgRoleUserId = _sessionContext.UserSession.CurrentOrganizationRole.OrganizationRoleUserId, StartTime = DateTime.Now, IsIncoming = isInbound, CalledInNumber = dn, CallerNumber = cn, DateCreated = DateTime.Now, DateModified = DateTime.Now, Status = (long)CallStatus.Initiated }; call = _callCenterCallRepository.Save(call); GuId = Guid.NewGuid().ToString(); var registrationFlow = new RegistrationFlowModel { GuId = GuId, CallId = call.Id, PreQualificationResultId = 0 }; RegistrationFlow = registrationFlow; Response.RedirectUser("~/App/CallCenter/CallCenterRep/BasicCallInfo.aspx?guid=" + GuId); return(null); }
public void Register(long customerId, long prospectCustomerId) { var organizationRoleUserId = _sessionContext.UserSession.CurrentOrganizationRole.OrganizationRoleUserId; var callId = _outboundCallQueueService.SetCallDetail(organizationRoleUserId); var guid = Guid.NewGuid().ToString(); var registrationFlow = new RegistrationFlowModel { GuId = guid, CallId = callId }; Session[guid] = registrationFlow; if (customerId == 0 && prospectCustomerId > 0) { UpdateContactedInfo(prospectCustomerId); registrationFlow.ProspectCustomerId = prospectCustomerId; Response.RedirectUser("/App/CallCenter/CallCenterRep/BasicCallInfo.aspx?guid=" + guid); } else if (customerId > 0 && prospectCustomerId > 0) { var customer = _customerRepository.GetCustomer(customerId); UpdateContactedInfo(prospectCustomerId); registrationFlow.ProspectCustomerId = prospectCustomerId; Response.RedirectUser("/App/CallCenter/CallCenterRep/CustomerVerification.aspx?CustomerID=" + customerId + "&Zip=" + customer.Address.ZipCode.Zip + "&guid=" + guid); } }
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); }
protected void Page_Load(object sender, EventArgs e) { SetTitles(); if (CustomerType == CustomerType.Existing) { dvTitle.InnerText = "Technician Existing Customer"; } if (!IsPostBack) { if (string.IsNullOrEmpty(Request.QueryString["guid"])) { hfGuId.Value = Guid.NewGuid().ToString(); var registrationFlow = new RegistrationFlowModel { GuId = hfGuId.Value }; RegistrationFlow = registrationFlow; } txtFirstName.Focus(); BindStateDropDown(); ClientScript.RegisterStartupScript(typeof(string), "jscode_setFirstNameFocus", "setFocusFirstName();", true); } SetJavaScriptEvents(); }
public ActionResult RegisterForEvent(long callQueueCustomerId, long eventId, long callId, long attemptId, bool isGmsCall = false, bool isViciCall = false, long previousEventId = 0) { var guid = Guid.NewGuid().ToString(); CallQueueCustomer callQueueCustomer = null; long customerId = 0; long prospectCustomerId = 0; long campaignId = 0; if (callQueueCustomerId > 0) { callQueueCustomer = _callQueueCustomerRepository.GetById(callQueueCustomerId); customerId = callQueueCustomer.CustomerId.HasValue ? callQueueCustomer.CustomerId.Value : 0; prospectCustomerId = callQueueCustomer.ProspectCustomerId.HasValue ? callQueueCustomer.ProspectCustomerId.Value : 0; campaignId = callQueueCustomer.CampaignId.HasValue ? callQueueCustomer.CampaignId.Value : 0; } else { var call = _callCenterCallRepository.GetById(callId); customerId = call.CalledCustomerId; } var registrationFlow = new RegistrationFlowModel { GuId = guid, CallId = callId, EventId = eventId, CallQueueCustomerId = callQueueCustomerId, CustomerId = customerId, ProspectCustomerId = prospectCustomerId, CampaignId = campaignId, AttempId = attemptId, IsGmsCall = isGmsCall, IsViciCall = isViciCall }; Session[guid] = registrationFlow; if (registrationFlow.CustomerId > 0) { if (previousEventId > 0) { _eventCustomerQuestionAnswerService.UpdatePreQualifiedTestAnswers(customerId, eventId, previousEventId, _sessionContext.UserSession.CurrentOrganizationRole.OrganizationRoleUserId); } _callCenterCallRepository.UpdateCallCenterCallStatus(CallType.Existing_Customer.ToString().Replace("_", " "), callId); string redirectUrl = _settings.AppUrl + "/App/CallCenter/CallCenterRep/ExistingCustomer/ExistingCustomer.aspx?CustomerType=Existing&CustomerID=" + registrationFlow.CustomerId + "&guid=" + guid; Response.RedirectUser(redirectUrl); return(null); } if (registrationFlow.ProspectCustomerId > 0) { _callCenterCallRepository.UpdateCallCenterCallStatus(CallType.Register_New_Customer.ToString().Replace("_", " "), callId); string redirectUrl = _settings.AppUrl + "/App/CallCenter/CallCenterRep/ExistingCustomer/ExistingCustomer.aspx?CustomerType=New&guid=" + guid; Response.RedirectUser(redirectUrl); return(null); } return(null); }
public ActionResult CustomerDetails(long callQueueCustomerId, long customerId, long callId) { var guid = Guid.NewGuid().ToString(); var registrationFlow = new RegistrationFlowModel { GuId = guid, CallId = callId, CallQueueCustomerId = callQueueCustomerId, CustomerId = customerId }; Session[guid] = registrationFlow; Response.RedirectUser(_settings.AppUrl + "/App/CallCenter/CallCenterRep/CallCenterRepCustomerDetails.aspx?CustomerID=" + customerId + "&guid=" + guid); return(null); }
public void StartOutboundCall(long customerId, long prospectCustomerId, long callQueueCustomerId) { var organizationRoleUserId = _sessionContext.UserSession.CurrentOrganizationRole.OrganizationRoleUserId; var callId = _outboundCallQueueService.SetCallDetail(organizationRoleUserId, customerId); var guid = Guid.NewGuid().ToString(); var registrationFlow = new RegistrationFlowModel { GuId = guid, CallId = callId, CallQueueCustomerId = callQueueCustomerId }; var callQueueCustomer = _callQueueCustomerRepository.GetById(callQueueCustomerId); callQueueCustomer.Status = CallQueueStatus.InProcess; callQueueCustomer.DateModified = DateTime.Now; callQueueCustomer.ModifiedByOrgRoleUserId = _sessionContext.UserSession.CurrentOrganizationRole.OrganizationRoleUserId; _callQueueCustomerRepository.Save(callQueueCustomer); var callQueueCustomerCall = new CallQueueCustomerCall { CallQueueCustomerId = callQueueCustomerId, CallId = callId }; _callQueueCustomerCallRepository.Save(callQueueCustomerCall); Session[guid] = registrationFlow; if (customerId == 0 && prospectCustomerId > 0) { UpdateContactedInfo(prospectCustomerId); registrationFlow.ProspectCustomerId = prospectCustomerId; Response.RedirectUser("/App/CallCenter/CallCenterRep/BasicCallInfo.aspx?guid=" + guid); } else if (customerId > 0) { var customer = _customerRepository.GetCustomer(customerId); var prospectCustomer = _prospectCustomerRepository.GetProspectCustomerByCustomerId(customerId); if (prospectCustomer != null) { UpdateContactedInfo(prospectCustomer.Id); registrationFlow.ProspectCustomerId = prospectCustomer.Id; } Response.RedirectUser("/App/CallCenter/CallCenterRep/CustomerVerification.aspx?CustomerID=" + customerId + "&Zip=" + customer.Address.ZipCode.Zip + "&guid=" + guid); } }
protected void lnkSelectEvent_Click(object sender, EventArgs e) { var lnkEvent = (ImageButton)sender; long eventId = Convert.ToInt64(lnkEvent.CommandArgument); long customerId = IoC.Resolve <ISessionContext>().UserSession.CurrentOrganizationRole.OrganizationRoleUserId; if (PackageRegistrationValidators.EventValidation(customerId, eventId)) { IEventCustomerRegistrationViewDataRepository eventCustomerRegistrationViewDataRepository = new EventCustomerRegistrationViewDataRepository(); var data = eventCustomerRegistrationViewDataRepository.GetEventCustomerOrders(customerId, Convert.ToInt64( lnkEvent.CommandArgument)); if (data != null) { var packageAndTest = data.PackageName; packageAndTest = string.IsNullOrEmpty(packageAndTest) ? data.AdditinalTest : packageAndTest + (string.IsNullOrEmpty(data.AdditinalTest) ? string.Empty : ", " + data.AdditinalTest); divErrorMsg.InnerHtml = "You are already registered for this event (" + data.EventName + " ) at " + data.EventDate.ToString("dddd dd MMMM yyyy") + " " + data.AppointmentStartTime.ToString("hh:mm tt") + " for the " + packageAndTest + ". Duplicate registrations, on one event, for the same customer are not allowed."; divErrorMsg.Visible = true; return; } } var service = IoC.Resolve <IRefundRequestService>(); var result = service.CheckifCancelAppointmentRequestExistsforaCustomer(eventId, customerId); if (result) { var settings = IoC.Resolve <ISettings>(); divErrorMsg.InnerHtml = "Your appointment has been cancelled for this event, the cancellation request is in process. Re-registration is not allowed unless the request is resolved. Please call on this number " + settings.CustomerPortalPhoneTollFree; divErrorMsg.Visible = true; return; } if (string.IsNullOrEmpty(GuId) || RegistrationFlow == null) { GuId = Guid.NewGuid().ToString(); var registrationFlow = new RegistrationFlowModel { GuId = GuId, EventId = eventId }; RegistrationFlow = registrationFlow; } else { RegistrationFlow.EventId = eventId; } if (RegistrationFlow.AppointmentSlotIds != null && RegistrationFlow.AppointmentSlotIds.Count() > 0) { var eventSchedulingSlotRepository = IoC.Resolve <IEventSchedulingSlotRepository>(); var slots = eventSchedulingSlotRepository.GetbyIds(RegistrationFlow.AppointmentSlotIds); if (slots.Where(s => s.EventId != eventId).Any()) { eventSchedulingSlotRepository.ReleaseSlots(RegistrationFlow.AppointmentSlotIds); RegistrationFlow.AppointmentSlotIds = null; } } Response.RedirectUser("UpdateEventCustomerProfile.aspx?guid=" + RegistrationFlow.GuId); }
protected void Page_Load(object sender, EventArgs e) { Page.Title = "Request Report"; if (CurrentOrgRole.CheckRole((long)Roles.Technician) || CurrentOrgRole.CheckRole((long)Roles.NursePractitioner)) { var obj = (Franchisee_Technician_TechnicianMaster)Master; obj.settitle("Request Report"); obj.SetBreadcrumb = "<a href=\"/Scheduling/Event/Index\">Dashboard</a>"; this.Form.Action = Request.RawUrl; } else { var obj = (CallCenter_CallCenterMaster1)Master; obj.SetTitle("Request Report"); obj.SetBreadCrumbRoot = "<a href=\"/CallCenter/CallCenterRepDashboard/Index\">Dashboard</a>"; obj.hideucsearch(); } if (CurrentOrgRole.CheckRole((long)Roles.FranchisorAdmin)) { this.Form.Action = Request.RawUrl; } if (Request.QueryString["Call"] != null && Request.QueryString["Call"] == "No") { divCall.Style.Add(HtmlTextWriterStyle.Display, "none"); divCall.Style.Add(HtmlTextWriterStyle.Visibility, "hidden"); } if (!string.IsNullOrEmpty(Request.QueryString["EventId"])) { ResultOtion.EventId = Convert.ToInt64(Request.QueryString["EventId"]); } if (!IsPostBack) { if (string.IsNullOrEmpty(Request.QueryString["guid"]) && (CurrentOrgRole.CheckRole((long)Roles.Technician) || CurrentOrgRole.CheckRole((long)Roles.NursePractitioner) || CurrentOrgRole.CheckRole((long)Roles.FranchisorAdmin))) { hfGuId.Value = Guid.NewGuid().ToString(); var registrationFlow = new RegistrationFlowModel { GuId = hfGuId.Value }; RegistrationFlow = registrationFlow; } if (!string.IsNullOrEmpty(Request.QueryString["EventId"])) { hfEventID.Value = Request.QueryString["EventId"]; } RegistrationFlow.ShippingDetailId = 0; ProductOption.IsProductSelected = true; ProductOption.IsProductCheckboxEnabled = false; //if (!string.IsNullOrEmpty(Request.QueryString["EventId"])) // ProductOption.EventId = Convert.ToInt64(Request.QueryString["EventId"]); if (CallId != null) { hfCallStartTime.Value = new CallCenterCallRepository().GetCallStarttime(CallId.Value); } var customerRepository = IoC.Resolve <ICustomerRepository>(); var objCustomer = customerRepository.GetCustomer(CustomerId); spnCustomerName.InnerText = objCustomer.NameAsString; spnAddress.InnerText = objCustomer.Address.ToString(); spnEmail.InnerText = objCustomer.Email != null?objCustomer.Email.ToString() : string.Empty; ViewState["UrlReferer"] = "/App/CallCenter/CallCenterRep/CustomerOptions.aspx?CustomerID=" + objCustomer.CustomerId + "&Name=" + objCustomer.NameAsString + "&guid=" + GuId;//Request.UrlReferrer.PathAndQuery; if (CurrentOrgRole.CheckRole((long)Roles.Technician) || CurrentOrgRole.CheckRole((long)Roles.NursePractitioner) || CurrentOrgRole.CheckRole((long)Roles.FranchisorAdmin)) { if (!Request.UrlReferrer.PathAndQuery.ToLower().Contains(("/MakePaymentforAddonProduct").ToLower())) { ViewState["UrlReferer"] = Request.UrlReferrer.PathAndQuery; } else { ViewState["UrlReferer"] = Session["c_url"]; } } var masterDal = new MasterDAL(); List <EEvent> customerEvent = masterDal.GetCustomerEvent(CustomerId.ToString(), 1); var 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"); tbltemp.Columns.Add("EventStatus"); 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; string strHostAddress = CommonCode.AddressMultiLine(customerEvent[intCounter].Host.Address.Address1, customerEvent[intCounter].Host.Address.Address2, customerEvent[intCounter].Host.Address.City, customerEvent[intCounter].Host.Address.State, customerEvent[intCounter].Host.Address.Zip); tbltemp.Rows.Add(new object[] { customerEvent[intCounter].EventID, customerEvent[intCounter].Name, strEventDate, customerEvent[intCounter].Host.Address.City, strAppointmentStartTime, strPackage, strPayMethod, strReportStatus, customerEvent[intCounter].Customer[0].CustomerEventTestID, customerEvent[intCounter].Host.Name, strHostAddress, Convert.ToString(Enum.Parse(typeof(EventStatus), customerEvent[intCounter].EventStatus.ToString())) }); } dgeventhistory.DataSource = tbltemp; ViewState["DSGRID"] = tbltemp; dgeventhistory.DataBind(); dbsearch.Visible = true; dbsearch.Style["display"] = ""; dvSearchResult.InnerText = "Select the appointment you want to buy the add on product for:"; imgNext.Visible = true; } else { dbsearch.Visible = false; dbsearch.Style["display"] = ""; dgeventhistory.Visible = false; dvSearchResult.InnerText = "No Result found"; imgNext.Visible = false; } ResultOtion.ShowOnlineOption = false; } }