示例#1
0
 public void OnSelectedRackArrivant(string rackArrivant)
 {
     if (!string.IsNullOrEmpty(rackArrivant))
     {
         Rack rackSelected = Racks.FirstOrDefault(x => x.GisementPos == rackArrivant);
         if (rackSelected != null)
         {
             TransfertRackValidation.IdRackArrivant       = rackSelected.IdRack;
             TransfertRackValidation.GisementRackArrivant = rackSelected.GisementPos;
         }
         else
         {
             TransfertRackValidation.IdRackArrivant       = 0;
             TransfertRackValidation.GisementRackArrivant = string.Empty;
         }
     }
 }
示例#2
0
        private void SelectedRackEmpty <T>(string selected, T validator) where T : BaseValidation
        {
            if (!string.IsNullOrEmpty(selected))
            {
                Rack rackSelected = Racks.FirstOrDefault(x => x.GisementPos == selected);

                if (rackSelected != null)
                {
                    validator.IdRack       = rackSelected.IdRack;
                    validator.GisementRack = rackSelected.GisementPos;
                }
                else
                {
                    validator.GisementRack = string.Empty;
                    validator.IdRack       = 0;
                }
            }
        }