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); }
public void UpdateCallStatus(int eventid, ECall call) { call.TimeEnd = DateTime.Now.ToString(); call.EventID = eventid; var callcenterDal = new CallCenterDAL(); callcenterDal.UpdateCall(call); }
public void Send(string pName, ECall mode, params object[] arguments) { NetworkCallAttribute networkCall; var index = GetCall(pName, out networkCall); if (index < 0) { return; } var type = networkCall.PacketType; byte[] buffer; GetPacket(type, index, out buffer, arguments); Send(mode, type, buffer); }
public void Send(string pName, ECall mode, byte[] bytes, int length) { NetworkCallAttribute networkCall; var index = GetCall(pName, out networkCall); if (index == -1) { return; } var type = networkCall.PacketType; int size; byte[] buffer; GetPacket(type, index, out size, out buffer, bytes, length); Send(mode, type, buffer, size); }
public void Send(string pName, ECall mode, Vector3 point, params object[] arguments) { NetworkCallAttribute networkCall; var index = GetCall(pName, out networkCall); if (index == -1) { return; } var type = networkCall.PacketType; float radius = networkCall.MaxRadius; byte[] buffer; GetPacket(type, index, out buffer, arguments); Send(mode, point, radius, type, buffer); }
public void CloseWrite(string channelName, ECall mode, EPacket type) { LogUtils.Debug(nameof(CloseWrite) + ": " + channelName); if (!type.IsChunk()) { LogUtils.LogNetwork("Error: Failed to stream non chunk: " + type); } else { NetworkCallAttribute networkCall; var index = GetCall(channelName, out networkCall); if (index == -1) { return; } byte[] buffer; GetPacket(type, index, out buffer); Send(mode, type, buffer); } }
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 = "Customer List"; CallCenter_CallCenterMaster1 obj; obj = (CallCenter_CallCenterMaster1)this.Master; obj.SetTitle("Customer List"); obj.SetBreadCrumbRoot = "<a href=\"/CallCenter/CallCenterRepDashboard/Index\">Dashboard</a>"; 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(); ECall objCall = repository.GetCallCenterEntity(ExistingCallId); hfCallStartTime.Value = objCall.TimeCreated; } } }
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(); } }
public Int64 UpdateCall(ECall objCall) { Int64 returnvalue = new Int64(); SqlParameter[] arParms = new SqlParameter[17]; arParms[0] = new SqlParameter("@CallID", SqlDbType.BigInt); arParms[0].Value = Convert.ToInt64(objCall.CallID); arParms[1] = new SqlParameter("@CallCenterCallCenterUserID", SqlDbType.BigInt); arParms[1].Value = Convert.ToInt64(objCall.CallCenterCallCenterUserID); arParms[2] = new SqlParameter("@IsNewCustomer", SqlDbType.Bit); arParms[2].Value = objCall.IsNewCustomer; arParms[3] = new SqlParameter("@CallCustomerID", SqlDbType.BigInt); if (objCall.CalledCustomerID.ToString() == "") { arParms[3].Value = DBNull.Value; } else { arParms[3].Value = Convert.ToInt64(objCall.CalledCustomerID); } arParms[4] = new SqlParameter("@TimeCreated", SqlDbType.DateTime); if (objCall.TimeCreated == null || objCall.TimeCreated.ToString() == "") { arParms[4].Value = DBNull.Value; } else { arParms[4].Value = Convert.ToDateTime(objCall.TimeCreated); } arParms[5] = new SqlParameter("@TimeEnd", SqlDbType.DateTime); if (objCall.TimeEnd == null || objCall.TimeEnd.ToString() == "") { arParms[5].Value = DBNull.Value; } else { arParms[5].Value = Convert.ToDateTime(objCall.TimeEnd); } arParms[6] = new SqlParameter("@CallStatus", SqlDbType.VarChar, 500); if (objCall.CallStatus == null) { arParms[6].Value = DBNull.Value; } else { arParms[6].Value = objCall.CallStatus; } arParms[7] = new SqlParameter("@DateCreated", SqlDbType.DateTime); if (objCall.DateCreated == null || objCall.DateCreated.ToString() == "") { arParms[7].Value = DBNull.Value; } else { arParms[7].Value = Convert.ToDateTime(objCall.DateCreated); } arParms[8] = new SqlParameter("@DateModified", SqlDbType.DateTime); if (objCall.DateModified == null || objCall.DateModified.ToString() == "") { arParms[8].Value = DBNull.Value; } else { arParms[8].Value = Convert.ToDateTime(objCall.DateModified); } arParms[9] = new SqlParameter("@returnCallID", SqlDbType.BigInt); arParms[9].Direction = ParameterDirection.Output; arParms[10] = new SqlParameter("@CallBackNumber", SqlDbType.VarChar, 100); if (objCall.CallBackNumber == null) { arParms[10].Value = DBNull.Value; } else { arParms[10].Value = objCall.CallBackNumber; } arParms[11] = new SqlParameter("@IncomingPhoneLine", SqlDbType.VarChar, 50); if (objCall.IncomingPhoneLine == null || objCall.IncomingPhoneLine.ToString() == "") { arParms[11].Value = DBNull.Value; } else { arParms[11].Value = objCall.IncomingPhoneLine; } arParms[12] = new SqlParameter("@CallersPhoneNumber", SqlDbType.VarChar, 50); if (objCall.CallersPhoneNumber == null || objCall.CallersPhoneNumber.ToString() == "") { arParms[12].Value = DBNull.Value; } else { arParms[12].Value = objCall.CallersPhoneNumber; } arParms[13] = new SqlParameter("@EventID", SqlDbType.BigInt); if (objCall.EventID > 0) { arParms[13].Value = Convert.ToInt64(objCall.EventID); } else { arParms[13].Value = DBNull.Value; } arParms[14] = new SqlParameter("@SourceCode", SqlDbType.VarChar, 50); if (objCall.SourceCode == null || objCall.SourceCode.ToString() == "") { arParms[14].Value = DBNull.Value; } else { arParms[14].Value = objCall.SourceCode; } // Begin Added OutBound Fields[Viranjay] arParms[15] = new SqlParameter("@OutBound", SqlDbType.Bit); arParms[15].Value = objCall.OutBound; arParms[16] = new SqlParameter("@status", SqlDbType.BigInt); if (objCall.Status > 0) { arParms[16].Value = objCall.Status; } else { arParms[16].Value = CallStatus.Initiated; } // End Added OutBound Fields[Viranjay] SqlHelper.ExecuteNonQuery(connectionstring, CommandType.StoredProcedure, "usp_updatecallinfo", arParms); returnvalue = (Int64)arParms[9].Value; return(returnvalue); }
private List <ECall> ParseCallsDataSet(DataSet dtsCalls) { List <ECall> objCalls = new List <ECall>(); for (int count = 0; count < dtsCalls.Tables[0].Rows.Count; count++) { try { ECall objCall = new ECall(); objCall.CallCenterCallCenterUserID = Convert.ToInt32(dtsCalls.Tables[0].Rows[count]["CallCenterCallCenterUserID"]); //objCall.CalledUserID = Convert.ToInt32(dtsCalls.Tables[0].Rows[count]["CalledCustomerID"]); objCall.CallID = Convert.ToInt32(dtsCalls.Tables[0].Rows[count]["CallID"]); objCall.CallStatus = Convert.ToString(dtsCalls.Tables[0].Rows[count]["CallStatus"]); objCall.DateCreated = Convert.ToString(dtsCalls.Tables[0].Rows[count]["DateCreated"]); objCall.DateModified = Convert.ToString(dtsCalls.Tables[0].Rows[count]["DateModified"]); //objCall.EventID = Convert.ToInt32(dtsCalls.Tables[0].Rows[count]["EventID"]); //objCall.IsNewCustomer = Convert.ToBoolean(dtsCalls.Tables[0].Rows[count]["IsNewCustomer"]); objCall.TimeCreated = Convert.ToString(dtsCalls.Tables[0].Rows[count]["TimeCreated"]); objCall.TimeEnd = Convert.ToString(dtsCalls.Tables[0].Rows[count]["TimeEnd"]); dtsCalls.Tables[1].DefaultView.RowFilter = "CallID =" + objCall.CallID; if (dtsCalls.Tables[1].DefaultView.Count > 0) { List <ECallCenterNotes> objCallNotes = new List <ECallCenterNotes>(); DataView dvCallNotes = dtsCalls.Tables[1].DefaultView; int icount = 0; while (icount < dvCallNotes.Count) { ECallCenterNotes objCallNote = new ECallCenterNotes(); objCallNote.Notes = Convert.ToString(dvCallNotes[icount]["Notes"]); objCallNote.CallCenterNotesID = Convert.ToInt32(dvCallNotes[icount]["CallCenterNotesID"]); objCallNotes.Add(objCallNote); icount++; } objCall.CallNotes = objCallNotes; } if (dtsCalls.Tables[2] != null) { if (dtsCalls.Tables[2].Rows[0]["TotalCalls"] != DBNull.Value) { objCall.TotalCalls = Convert.ToInt32(dtsCalls.Tables[2].Rows[0]["TotalCalls"]); } else { objCall.TotalCalls = 0; } } objCalls.Add(objCall); } catch { } } return(objCalls); }
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"; } } } }
public void Send(ECall mode, Vector3 point, float radius, EPacket type, byte[] packet, int size) { radius *= radius; switch (mode) { case ECall.Server: if (Connection.IsServer()) { Receive(Connection.ServerID, packet, 0, size); } else { Connection.Send(Connection.ServerID, type, packet, size, ID); } break; case ECall.All: if (!(Connection.IsServer())) { Connection.Send(Connection.ServerID, type, packet, size, ID); } foreach (User user in Connection.Clients) { if ((user.Identity == Connection.ClientID) || (user.Player == null)) { continue; } Vector3 vector = user.Player.transform.position - point; if (vector.sqrMagnitude < radius) { Connection.Send(user.Identity, type, packet, size, ID); } } if (Connection.IsServer()) { Receive(Connection.ServerID, packet, 0, size); } else { Receive(Connection.ClientID, packet, 0, size); } break; case ECall.Others: if (!(Connection.IsServer())) { Connection.Send(Connection.ServerID, type, packet, size, ID); } foreach (User user in Connection.Clients) { if ((user.Identity == Connection.ClientID) || (user.Player == null)) { continue; } Vector3 vector2 = user.Player.transform.position - point; if (vector2.sqrMagnitude < radius) { Connection.Send(user.Identity, type, packet, size, ID); } } break; case ECall.Owner: if (IsOwner) { Receive(Owner, packet, 0, size); } else { Connection.Send(Owner, type, packet, size, ID); } break; case ECall.NotOwner: if (!(Connection.IsServer())) { Connection.Send(Connection.ServerID, type, packet, size, ID); } foreach (User user in Connection.Clients) { if ((user.Identity == Owner) || (user.Player == null)) { continue; } Vector3 vector3 = user.Player.transform.position - point; if (vector3.sqrMagnitude < radius) { Connection.Send(user.Identity, type, packet, size, ID); } } break; case ECall.Clients: foreach (User user in Connection.Clients) { if ((user.Identity == Connection.ClientID) || (user.Player == null)) { continue; } Vector3 vector4 = user.Player.transform.position - point; if (vector4.sqrMagnitude < radius) { Connection.Send(user.Identity, type, packet, size, ID); } } if (Connection.IsServer()) { Receive(Connection.ClientID, packet, 0, size); } break; case ECall.Peers: foreach (User user in Connection.Clients) { if ((user.Identity == Connection.ClientID) || (user.Player == null)) { continue; } Vector3 vector5 = user.Player.transform.position - point; if (vector5.sqrMagnitude < radius) { Connection.Send(user.Identity, type, packet, size, ID); } } break; } }
public void Send(ECall mode, Vector3 point, float radius, EPacket type, byte[] packet) { Send(mode, point, radius, type, packet, packet.Length); }
public void Send(ECall mode, EPacket type, byte[] packet, int size) { LogUtils.LogNetwork(nameof(Send) + ": mode: " + mode + ", type: " + type + ", size: " + size); switch (mode) { case ECall.Server: if (Connection.IsServer()) { Receive(Connection.ServerID, packet, 0, size); } else { Connection.Send(Connection.ServerID, type, packet, size, ID); } break; case ECall.All: if (!(Connection.IsServer())) { LogUtils.LogNetwork("Warning: Im not the server, I can't send a message to all clients!!"); Connection.Send(Connection.ServerID, type, packet, size, ID); } foreach (User user in Connection.Clients) { if (user.Identity != Connection.ClientID) { Connection.Send(user.Identity, type, packet, size, ID); } } Receive(Connection.ClientID, packet, 0, size); break; case ECall.Others: if (!(Connection.IsServer())) { LogUtils.LogNetwork("Warning: Im not the server, I can't send a message to all other clients!!"); Connection.Send(Connection.ServerID, type, packet, size, ID); } foreach (var t in Connection.Clients.Where(t => t.Identity != Connection.ClientID)) { Connection.Send(t.Identity, type, packet, size, ID); } break; case ECall.Owner: if (IsOwner) { Receive(Owner, packet, 0, size); } else { Connection.Send(Owner, type, packet, size, ID); } break; case ECall.NotOwner: if (!(Connection.IsServer())) { LogUtils.LogNetwork("Warning: Im not the server, I can't send a message to all non owners!!"); Connection.Send(Connection.ServerID, type, packet, size, ID); } foreach (User user in Connection.Clients.Where(user => user.Identity != Owner)) { Connection.Send(user.Identity, type, packet, size, ID); } break; case ECall.Clients: foreach (User user in Connection.Clients) { if (user.Identity != Connection.ClientID) { Connection.Send(user.Identity, type, packet, size, ID); } } if (Connection.IsClient()) { Receive(Connection.ClientID, packet, 0, size); } break; case ECall.Peers: foreach (User user in Connection.Clients) { if (user.Identity != Connection.ClientID) { Connection.Send(user.Identity, type, packet, size, ID); } } break; } }
public void Send(ECall mode, EPacket type, byte[] packet) { Send(mode, type, packet, packet.Length); }