コード例 #1
0
 void bgUnRegisteredIncident_DoWork(object sender, DoWorkEventArgs e)
 {
     try
     {
         string            itemId            = e.Argument.ToString();
         PosIncidentReport posIncidentReport = new PosIncidentReport();
         posIncidentReport.ItemId             = Convert.ToInt32(itemId);
         posIncidentReport.CommitedQuantity   = 0;
         posIncidentReport.CommittedGainValue = 0;
         posIncidentReport.CommittedLossValue = 0;
         posIncidentReport.CostPrice          = CostPrice;
         posIncidentReport.Price           = SellPrice;
         posIncidentReport.ShelfQuantity   = 0;
         posIncidentReport.SystemQuantity  = 0;
         posIncidentReport.IncidentType    = 65;
         posIncidentReport.BranchId        = SettingHelpers.CurrentBranchId;
         posIncidentReport.IsRegisterItem  = true;
         posIncidentReport.CreatedDateTime = DateTime.UtcNow;
         posIncidentReport.IsProcess       = true;
         _posRepository.InsertPosIncidentReport(posIncidentReport);
     }
     catch (Exception)
     {
         throw;
     }
 }
コード例 #2
0
 public void InsertPosIncidentReport(PosIncidentReport posIncidentReport)
 {
     if (CheckForExistingIncident(posIncidentReport.ItemId, posIncidentReport.IncidentType))
     {
         _posItemIncident.Add(posIncidentReport);
         _posItemIncident.SaveChanges();
     }
 }
コード例 #3
0
 public void InsertPosIncidentReport(PosIncidentReport posIncidentReport)
 {
     if (!CheckForExistingIncident(posIncidentReport.ItemId, posIncidentReport.IncidentType))
     {
         string jsonString  = JsonConvert.SerializeObject(posIncidentReport);
         var    httpContent = new StringContent(jsonString, Encoding.UTF8, "application/json");
         var    response    = httpClient.PostAsync("api/incidentreport/insertposincidentreport", httpContent);
     }
 }