Ejemplo n.º 1
0
        private void simpleButton3_Click(object sender, EventArgs e)
        {
            ProductAddView  view  = new ProductAddView(null);
            CloseFormHandle close = new CloseFormHandle(delegate
            {
                this.mainDataTable.Clear();
                GetProductList();
            });

            ToolsManage.ShowForm(view, false, close);
        }
Ejemplo n.º 2
0
        public void ColumnButtonClick(object sender, ButtonPressedEventArgs e)
        {
            int         rowhandle = this.gridView1.FocusedRowHandle;
            StructGoods product   = this.products[rowhandle];

            DataRow row = this.gridView1.GetDataRow(rowhandle);
            String  tag = (String)e.Button.Tag;

            String[] param = tag.Split('_');
            //查看销售记录
            if (param[0].Equals(TitleList.SellRecord.ToString()))
            {
                ProductSellRecordView view = new ProductSellRecordView(product.GoodsId);
                MainViewManage.ShowSecondView(view);
            }
            else if (param[0].Equals(TitleList.Operation.ToString()))
            {
                //修改信息
                if (param[1].Equals("0"))
                {
                    ProductAddView  view  = new ProductAddView(product);
                    CloseFormHandle close = new CloseFormHandle(delegate
                    {
                        this.mainDataTable.Clear();
                        GetProductList();
                    });
                    ToolsManage.ShowForm(view, false, close);
                }
                //删除
                else
                {
                    List <int> ids = new List <int>()
                    {
                        product.GoodsId,
                    };
                    ProductNetOperation.DeleteProduct(DeleteProductResult, ids);
                }
            }
        }