示例#1
0
        private void Print()
        {
            if (_WarehouseFacade == null)
            {
                _WarehouseFacade = new WarehouseFacade(base.DataProvider);
            }
            if (this.gridWebGrid.Rows.Count <= 0)
            {
                return;
            }
            try
            {
                this.DataProvider.BeginTransaction();

                for (int i = 0; i < this.gridWebGrid.Rows.Count; i++)
                {
                    string  barno = this.gridWebGrid.Rows[i].Items.FindItemByKey("TDCartonNo").Value.ToString();
                    BarCode bar   = (BarCode)_WarehouseFacade.GetBarCode(barno);
                    bar.PrintTimes = bar.PrintTimes + 1;
                    _WarehouseFacade.UpdateBarCode(bar);
                }
                this.DataProvider.CommitTransaction();
            }
            catch (Exception ex)
            {
                this.DataProvider.RollbackTransaction();
                WebInfoPublish.PublishInfo(this, ex.Message, this.languageComponent1);
            }
        }