Пример #1
0
        private void OpenFormViewUpdate(ServiceRequest _request)
        {
            WACFormControl   form = getFormFromRequest(_request);
            WACFormViewModel fvvm = (WACFormViewModel)GetViewModelForControl(form);

            fvvm.OpenFormViewUpdate(form, _request.ParmList);
        }
Пример #2
0
        private void ReturnFormToReadOnly(ServiceRequest _request)
        {
            WACFormControl   form = getFormFromRequest(_request);
            WACFormViewModel fvvm = (WACFormViewModel)GetViewModelForControl(form);

            fvvm.ReturnToViewMode(form);
        }
Пример #3
0
        private void ClearFormView(ServiceRequest _request)
        {
            WACFormControl   form = getFormFromRequest(_request);
            WACFormViewModel fvvm = (WACFormViewModel)GetViewModelForControl(form);

            CloseFormView(_request);
        }
Пример #4
0
        private void HideFormModal(ServiceRequest _request)
        {
            WACFormControl   form = _request.Requestor as WACFormControl;
            WACFormViewModel fvvm = GetViewModelForControl(form) as WACFormViewModel;

            fvvm.ShowModal(form, false);
        }
Пример #5
0
        private void ReBindFormView(ServiceRequest _request)
        {
            WACFormControl   form = getFormFromRequest(_request);
            FormView         fv   = getFormViewFromRequest(_request);
            WACFormViewModel fvvm = (WACFormViewModel)GetViewModelForControl(form);

            fvvm.BindFormView(fv);
        }
Пример #6
0
        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);
        }
Пример #7
0
        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);
            }
        }
Пример #8
0
 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);
     }
 }
Пример #9
0
 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);
     }
 }
Пример #10
0
 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);
     }
 }