Ejemplo n.º 1
0
 public async Task RunUDF()
 {
     try
     {
         List <BinViewModel> list = BinsViewModel.BinViewModels.FindAll(x => x.IsSelected == true);
         if (list is List <BinViewModel> )
         {
             State         = ModelState.Loading;
             LoadAnimation = true;
             foreach (BinViewModel bvm in list)
             {
                 LoadingText = bvm.Code;
                 NAVFilter navfilter = new NAVFilter
                 {
                     LocationCodeFilter = bvm.LocationCode,
                     ZoneCodeFilter     = bvm.ZoneCode,
                     RackIDFilter       = bvm.RackID.ToString(),
                     BinCodeFilter      = bvm.Code
                 };
                 string response = await NAV.RunFunction(udfvmselected.ID, navfilter, 0, ACD.Default).ConfigureAwait(true);
             }
             State = ModelState.Normal;
         }
         else
         {
             State     = ModelState.Error;
             ErrorText = AppResources.RackCardPage_Error_BinDidNotSelect;
         }
     }
     catch (Exception e)
     {
         System.Diagnostics.Debug.WriteLine(e.Message);
         State     = ModelState.Error;
         ErrorText = e.Message;
     }
     finally
     {
         LoadAnimation = false;
     }
 }