protected void Page_Load(object sender, EventArgs e) { Absence _absenceService = new Absence(); if (AbsenceId != null && AbsenceId != "") { _absence = _absenceService.GetAbsenceByID(AbsenceId); } if (_absence != null && (_absence.Type == 4004)) { //load view with absence information TextBox txtBox = FindControl("txtName") as TextBox; if (txtBox != null) { txtBox.Text = _absence.CustomerID; } CustomerId = _absence.CustomerID; CollectionCall _collectionCallService = new CollectionCall(); List <CollectionCall> collectionCalls = _collectionCallService.GetCollectionCallsByCustomerId(CustomerId, _absence.HID); //feed the repeater with the collection calls Repeater rptCollectionCalls = FindControl("rptCollectionCalls") as Repeater; rptCollectionCalls.DataSource = collectionCalls; rptCollectionCalls.DataBind(); } }
public static Absence GetAbsenceById(string absenceId) { Absence myAbsence; Absence _absenceService = new Absence(); myAbsence = _absenceService.GetAbsenceByID(absenceId); return(myAbsence); }
public static string GetWorkflowType(string absenceId = null) { Absence myAbsence; string workflowType = null; if (absenceId != null) { Absence _absenceService = new Absence(); myAbsence = _absenceService.GetAbsenceByID(absenceId); workflowType = myAbsence.Type.ToString(); } return(workflowType); }
public static string GetCustomerIdFromAbsenceId(string absenceId = null) { string customerId; Absence myAbsence; if (absenceId != null) { Absence _absenceService = new Absence(); myAbsence = _absenceService.GetAbsenceByID(absenceId); customerId = myAbsence.CustomerID; return(customerId); } else { return(null); } }
public static string GetAccountVinHoldReason(string absenceId = null) { Absence myAbsence; string holdReason = ""; if (absenceId != null) { Absence _absenceService = new Absence(); myAbsence = _absenceService.GetAbsenceByID(absenceId); if (myAbsence.ID != null) { if (myAbsence.AccountVinOnHold) { holdReason = myAbsence.AccountVinHoldReason; } } } return(holdReason); }
public static string IsDisbursementOnHold(string absenceId = null) { Absence myAbsence; bool isOnHold = false; if (absenceId != null) { Absence _absenceService = new Absence(); myAbsence = _absenceService.GetAbsenceByID(absenceId); if (myAbsence.ID != null) { if (myAbsence.AccountVinOnHold) { isOnHold = true; } } } return(isOnHold.ToString()); }
protected void Page_Load(object sender, EventArgs e) { ValidationSettings.UnobtrusiveValidationMode = UnobtrusiveValidationMode.None; Absence _absenceService = new Absence(); if (AbsenceId != null && AbsenceId != "") { _absence = _absenceService.GetAbsenceByID(AbsenceId); } if (_absence != null && (_absence.Type == 1000 || _absence.Type == 1002)) { TextBox txtBox = FindControl("txtName") as TextBox; txtBox.Text = _absence.PayeeName; txtBox = FindControl("txtAddress1") as TextBox; txtBox.Text = _absence.PayeeAddress1; txtBox = FindControl("txtAddress2") as TextBox; txtBox.Text = _absence.PayeeAddress2; txtBox = FindControl("txtAddress3") as TextBox; txtBox.Text = _absence.PayeeAddress3; txtBox = FindControl("txtCity") as TextBox; txtBox.Text = _absence.PayeeCity; txtBox = FindControl("txtState") as TextBox; txtBox.Text = _absence.PayeeState; txtBox = FindControl("txtCountry") as TextBox; txtBox.Text = _absence.PayeeCountry; txtBox = FindControl("txtZip") as TextBox; txtBox.Text = _absence.PayeeZipCode; } }
public static void LoadAbsenceId(string absenceId = null, HiddenField hdnIsOnHold = null, HiddenField hdnOnHoldReason = null, RejectReasonsControl rejectionReasonCtrl = null, CreateShippingLabelControl shippingLabelCtrl = null, CollectionCallControl collectionCallCtrl = null, Exact.Web.UI.Controls.Button btnShippingLabel = null, Exact.Web.UI.Controls.Button btnCollectionCall = null) { Absence myAbsence; if (absenceId != null) { Absence _absenceService = new Absence(); myAbsence = _absenceService.GetAbsenceByID(absenceId); btnCollectionCall.Visible = false; if (myAbsence.ID != null && (myAbsence.Type == 1000 || myAbsence.Type == 1002 || myAbsence.Type == 1010 || myAbsence.Type == 1012)) { if (rejectionReasonCtrl != null) { rejectionReasonCtrl.AbsenceId = absenceId; } if (shippingLabelCtrl != null) { shippingLabelCtrl.AbsenceId = absenceId; } if (btnShippingLabel != null) { btnShippingLabel.Visible = false; if (myAbsence.Type == 1002 || myAbsence.Type == 1012) { if (myAbsence.Status != 2) { btnShippingLabel.Visible = true; } } } } else { btnShippingLabel.Visible = false; } if (hdnIsOnHold != null && hdnOnHoldReason != null) { if (myAbsence.AccountVinOnHold) { hdnIsOnHold.Value = true.ToString(); hdnOnHoldReason.Value = myAbsence.AccountVinHoldReason; } } //if absence is a Collection Call, and the status is not yet processed if (myAbsence.ID != null && myAbsence.Type == 4004) { if (collectionCallCtrl != null) { collectionCallCtrl.AbsenceId = absenceId; CollectionCall _collectionCallService = new CollectionCall(); List <CollectionCall> otherCollectionCalls = _collectionCallService.GetCollectionCallsByCustomerId(myAbsence.CustomerID, myAbsence.HID); if (btnCollectionCall != null) { //show collection call btnCollectionCall.Visible = false; if (myAbsence.Status != 3) { //hide collection call btnCollectionCall.Visible = true; } if (otherCollectionCalls == null || otherCollectionCalls.Count <= 1) { btnCollectionCall.Enabled = false; } } } } //if(hdnHoldReason != null && myAbsence.HoldReason != null && myAbsence.HoldReason != "") //{ // hdnHoldReason.Text = myAbsence.HoldReason; //} } }