static void Main(string[] args) { var service = new PrescoService(); var shipstatusRequest = service.GetShipStatusRequests(); //shipstatusRequest.Add(new ShipStatusRequest { ShipNo = "GMJI7110052847001" }); var updateresult = service.UpdateShipmentStatus(shipstatusRequest); Console.WriteLine(updateresult); }
static void Main(string[] args) { var service = new PrescoService(); var emailService = new EmailService(); var data = service.GetShopCollection("HK"); int errrorCount = 0; int maxRetry = 3; while (!data.RStatus && errrorCount < maxRetry) { errrorCount++; data = service.GetShopCollection("HK"); } if (errrorCount == maxRetry) { emailService.SendEmailAysnc("*****@*****.**", "there is an error while sending api to presco shop collect , error message :" + data.RMsg, "Presco Shop Collect Error"); return; } try { var shopcollectDailyFac = new ShopCollectDailyFac(); var shopcollectDaily = MapShopCollectDaily(data.DVal); shopcollectDailyFac.insertShopCollectDaily(shopcollectDaily); } catch (Exception ex) { var msg = ex.Message + "Stack Trace : " + ex.StackTrace; emailService.SendEmailAysnc("*****@*****.**", "there is an error while sending api to presco shop collect , error message :" + msg, "Presco Shop Collect Error"); } Console.WriteLine(data); }