public override void Process(PVLutResponse response)
 {
     try
     {
         GetInputParameters(response.Request, out int pickListNumber);
         List <PickItem> result = AgentsDBContext.Create().GetPickListItems(pickListNumber);
         result.ForEach(p => response.AddRecord(new List <string>()
         {
             0.ToString(),
             string.Empty,
             p.Sku,
             p.Location,
             p.CheckDigits,
             p.QuantityToPick.ToString(),
             p.QuantityToPick.ToString(),                                                  //Quantity remaining. Field used only on the device.
             p.Description,
             p.QuantityPicked.HasValue ? p.QuantityPicked.Value.ToString() : 0.ToString(), //Field used only on the device.
             p.PickStatusCode.HasValue ? p.PickStatusCode.ToString() : string.Empty        //Field used only on the device.
         }));
     }
     catch (Exception ex)
     {
         response.Records.Clear();
         response.AddRecord(new List <string>()
         {
             1.ToString(), ex.Message
         });
         throw ex;
     }
 }
Exemple #2
0
 public override void Process(PVLutResponse response)
 {
     try
     {
         AgentsDBContext.Create().LogOff(response.Request.OperatorId);
         response.AddRecord(new List <string>()
         {
             0.ToString(), string.Empty
         });
     }
     catch (Exception ex)
     {
         response.Records.Clear();
         response.AddRecord(new List <string>()
         {
             1.ToString(), ex.Message
         });
         throw ex;
     }
 }
 public override void Process(PVLutResponse response)
 {
     try
     {
         GetInputParameters(response.Request, out string password);
         AgentsDBContext.Create().Login(response.Request.OperatorId, password);
         response.AddRecord(new List <string>()
         {
             0.ToString(), string.Empty
         });
     }
     catch (Exception ex)
     {
         response.Records.Clear();
         response.AddRecord(new List <string>()
         {
             1.ToString(), ex.Message
         });
         throw ex;
     }
 }
 public override void Process(PVLutResponse response)
 {
     try
     {
         PickList result = AgentsDBContext.Create().GetPickList(response.Request.OperatorId);
         response.AddRecord(new List <string>()
         {
             0.ToString(),
             string.Empty,
             result.PickListNumber.ToString(),
             Convert.ToInt32(result.Picked).ToString(),
         });
     }
     catch (Exception ex)
     {
         response.Records.Clear();
         response.AddRecord(new List <string>()
         {
             1.ToString(), ex.Message
         });
         throw ex;
     }
 }