private void OpenFormViewUpdate(ServiceRequest _request) { WACFormControl form = getFormFromRequest(_request); WACFormViewModel fvvm = (WACFormViewModel)GetViewModelForControl(form); fvvm.OpenFormViewUpdate(form, _request.ParmList); }
private void ReturnFormToReadOnly(ServiceRequest _request) { WACFormControl form = getFormFromRequest(_request); WACFormViewModel fvvm = (WACFormViewModel)GetViewModelForControl(form); fvvm.ReturnToViewMode(form); }
private void ClearFormView(ServiceRequest _request) { WACFormControl form = getFormFromRequest(_request); WACFormViewModel fvvm = (WACFormViewModel)GetViewModelForControl(form); CloseFormView(_request); }
private void HideFormModal(ServiceRequest _request) { WACFormControl form = _request.Requestor as WACFormControl; WACFormViewModel fvvm = GetViewModelForControl(form) as WACFormViewModel; fvvm.ShowModal(form, false); }
private void ReBindFormView(ServiceRequest _request) { WACFormControl form = getFormFromRequest(_request); FormView fv = getFormViewFromRequest(_request); WACFormViewModel fvvm = (WACFormViewModel)GetViewModelForControl(form); fvvm.BindFormView(fv); }
private void CloseFormView(ServiceRequest _request) { // should only be called from Form Control, all other controls should call ClearFormView WACFormControl form = getFormFromRequest(_request); FormView fv = getFormViewFromRequest(_request); WACFormViewModel fvvm = (WACFormViewModel)GetViewModelForControl(form); fvvm.CloseFormView(form, fv); }
private void ShowFormModal(ServiceRequest _request) { WACFormControl form = _request.Requestor as WACFormControl; WACFormViewModel fvvm = GetViewModelForControl(form) as WACFormViewModel; if (fvvm != null && fvvm.ModalDisplayed) { fvvm.ShowModal(form, true); } }
private void InsertItem(ServiceRequest _request) { if (IsFormControl(_request.Requestor)) { ((WACFormControl)_request.Requestor).CurrentState = WACFormControl.FormState.ItemUpdated; WACFormViewModel vMod = GetViewModelForControl(_request) as WACFormViewModel; vMod.Insert(_request.Requestor as WACFormControl, _request.ServiceFor as FormView, _request.ParmList); } else if (IsTabControl(_request.Requestor)) { WACTabControlViewModel vMod = GetViewModelForControl(_request) as WACTabControlViewModel; vMod.Insert(_request.Requestor, _request.ParmList); } }
private void UpdateItem(ServiceRequest _request) { if (IsFormControl(_request.Requestor)) { ((WACFormControl)_request.Requestor).CurrentState = WACFormControl.FormState.ItemUpdated; WACFormViewModel vMod = GetViewModelForControl(_request) as WACFormViewModel; vMod.Update(_request.Requestor as WACFormControl, _request.ServiceFor as FormView, _request.ParmList); } else if (IsGridControl(_request.Requestor)) { ((WACGridControl)_request.Requestor).CurrentState = WACGridControl.ListState.ItemDeleted; WACGridViewModel vMod = GetViewModelForControl(_request) as WACGridViewModel; // vMod.Update(_request.Requestor as WACGridControl, _request.ServiceFor as GridView, _request.ParmList); } }
private void DeleteItem(ServiceRequest _request) { //DeleteItem is a authorization Pass-thru to Delete() //Insert and Update authorization checked on form changemode if (IsFormControl(_request.Requestor)) { ((WACFormControl)_request.Requestor).CurrentState = WACFormControl.FormState.ItemDeleted; WACFormViewModel vMod = GetViewModelForControl(_request) as WACFormViewModel; vMod.Delete(_request.Requestor as WACFormControl, _request.ServiceFor as FormView, _request.ParmList); } else if (IsGridControl(_request.Requestor)) { ((WACGridControl)_request.Requestor).CurrentState = WACGridControl.ListState.ItemDeleted; WACGridViewModel vMod = GetViewModelForControl(_request) as WACGridViewModel; vMod.Delete(_request.Requestor as WACGridControl, _request.ServiceFor as GridView, _request.ParmList); } }