예제 #1
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            StockEditorChooseForm f = new StockEditorChooseForm();

            if (f.ShowDialog() == DialogResult.OK)
            {
                this._stockEditor = f.SelectedItem as Model.StockEditor;


                this.lookUpEditDepot.EditValue   = this._stockEditor.DepotId;
                this.lookUpEditProCate.EditValue = this._stockEditor.ProductCategoryId;
                this._stockCheck.StockEditorId   = this._stockEditor.StockEditorId;
                foreach (Model.StockEditorDetal editDetail in new BL.StockEditorDetalManager().SelectByStockEditorId(this._stockEditor.StockEditorId))
                {
                    Model.StockCheckDetail detail = new Book.Model.StockCheckDetail();
                    detail.StockCheckDetailId     = Guid.NewGuid().ToString();
                    detail.Product                = editDetail.Product;
                    detail.ProductId              = editDetail.ProductId;
                    detail.ProductUnitName        = editDetail.ProductUnitName;
                    detail.StockCheck             = this._stockCheck;
                    detail.StockCheckId           = this._stockCheck.StockCheckId;
                    detail.StockCheckQuantity     = editDetail.StockEditorQuantity;
                    detail.StockCheckBookQuantity = this.stockManager.GetStockByProductIdAndDepotPositionId(editDetail.ProductId, editDetail.DepotPositionId) == null ? 0 : this.stockManager.GetStockByProductIdAndDepotPositionId(editDetail.ProductId, editDetail.DepotPositionId).StockQuantity1;
                    detail.DepotPosition          = editDetail.DepotPosition;
                    detail.DepotPositionId        = editDetail.DepotPositionId;
                    detail.Directions             = editDetail.Directions;
                    this._stockCheck.Details.Add(detail);
                    this.gridControl1.RefreshDataSource();
                }
            }
        }
예제 #2
0
        private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            StockEditorChooseForm f = new StockEditorChooseForm();

            f.Show();
        }