private void changeMode(Mode _viewmode) { if (_viewmode.Equals(Mode.EDIT)) { clearLoanIssuePage(); List <Control> ControlList = HandleControllers.GetLogicalChildCollection <Control>(this); HandleControllers.enableContent(ControlList, true, true, true, true, true); SelectedEmployee = Session.SelectedLoan.employee; SelectedCustomer = Session.SelectedLoan.customer; SelectedLoan = Session.SelectedLoan; SelectedLoan_Type = Session.SelectedLoan.loan_type; } if (_viewmode.Equals(Mode.VIEW)) { clearLoanIssuePage(); List <Control> ControlList = HandleControllers.GetLogicalChildCollection <Control>(this); HandleControllers.enableContent(ControlList, false, false, false, false, false); SelectedEmployee = Session.SelectedLoan.employee; SelectedCustomer = Session.SelectedLoan.customer; SelectedLoan = Session.SelectedLoan; SelectedLoan_Type = Session.SelectedLoan.loan_type; } if (_viewmode.Equals(Mode.NEW)) { clearLoanIssuePage(); List <Control> ControlList = HandleControllers.GetLogicalChildCollection <Control>(this); HandleControllers.enableContent(ControlList, true, true, true, true, true); } CustomerTextBox.IsEnabled = false; EmployeeTextBox.IsEnabled = false; LoanTypeTextBox.IsEnabled = false; }
public StaffInfo(Mode mode) { InitializeComponent(); if (mode.Equals(Mode.EDIT)) { this.mode = mode; if (Session.SelectedEmployee != null) { SetEmployeeDetails(Session.SelectedEmployee); } } if (mode.Equals(Mode.VIEW)) { this.mode = mode; List <Control> ControlList = HandleControllers.GetLogicalChildCollection <Control>(this); HandleControllers.enableContent(ControlList, false, false, false, false, false); if (Session.SelectedEmployee != null) { SetEmployeeDetails(Session.SelectedEmployee); } } if (mode.Equals(Mode.NEW)) { this.mode = mode; GridStaffInfo.DataContext = new employee(); } }
public DetailsPage(Mode mode) { InitializeComponent(); // setAreaCodeToComboBox(); this.mode = mode; if (mode.Equals(Mode.EDIT)) { if (Session.SelectedCustomer != null) { _customer = Session.SelectedCustomer; GridCustomerInfo.DataContext = _customer; } } if (mode.Equals(Mode.VIEW)) { List <Control> ControlList = HandleControllers.GetLogicalChildCollection <Control>(this); HandleControllers.enableContent(ControlList, false, false, false, false, false); CustomerPage.ViewMode = Mode.VIEW; if (Session.SelectedCustomer != null) { _customer = Session.SelectedCustomer; GridCustomerInfo.DataContext = _customer; } } if (mode.Equals(Mode.NEW)) { this.mode = mode; _customer = new customer(); GridCustomerInfo.DataContext = _customer; } this.DataContext = this; _instance = this; }
private void clearLoanTypePage() { HandleControllers.clearContent(HandleControllers.GetLogicalChildCollection <Control>(this)); }