Esempio n. 1
0
 public void DoAction(FunctionListVM vm)
 {
     if (vm.SelectedFunction == null)
     {
         return;
     }
     functionService.GetFunction((res, exp) => pmsController.BeginInvokeOnDispatcher(() =>
     {
         if (exp != null)
         {
             pmsController.HandleException(exp);
         }
         if (res != null)
         {
             basicInfoController.ShowFunctionView(res, ActionType.ModifyFunction);
         }
         else
         {
             pmsController.ShowMessage("تابع مورد نظر یافت نشد");
         }
     }), vm.SelectedFunction.Id);
 }
Esempio n. 2
0
 public void Load(FunctionDTO functionParam, ActionType actionTypeParam)
 {
     actionType = actionTypeParam;
     Function   = functionParam;
     if (actionType == ActionType.ModifyFunction)
     {
         ShowBusyIndicator();
         functionService.GetFunction((res, exp) => appController.BeginInvokeOnDispatcher(() =>
         {
             HideBusyIndicator();
             if (exp == null)
             {
                 Function = res;
             }
             else
             {
                 appController.HandleException(exp);
             }
         }),
                                     functionParam.Id);
     }
 }