Пример #1
0
        public void CancelOrderInAx(string orderId)
        {
            using(var ax = Login())
            {
                dynamic table = new CandyDirect.AppServices.DB.SalesLine();
                var recs = table.FindBy(SalesId:orderId);

                ax.TTSBegin();
                foreach (var rec in recs)
                {
                    using (var axRecord = ax.CreateAxaptaRecord("SalesLine"))
                    {
                        axRecord.ExecuteStmt("select forupdate * from %1 where %1.RecId == " + rec.RECID);
                        if(axRecord.Found)
                        {
                            axRecord.set_Field("RemainSalesPhysical",0.0);
                            axRecord.set_Field("RemainInventPhysical",0.0);

                            axRecord.Update();
                        }
                    }
                }
                ax.TTSCommit();
                NLog.LogManager.GetCurrentClassLogger().Info("Order Canceled {0}", orderId);
            }
        }
 public void CanGetSalesLineRecordsWithMasive()
 {
     dynamic table = new CandyDirect.AppServices.DB.SalesLine();
     var recs = table.FindBy(SalesId:"100058005");
 }