Ejemplo n.º 1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            FrmGoodsAdd from = new FrmGoodsAdd();
            if (from.ShowDialog() == DialogResult.OK)
            {
                unitOfWork1.DropIdentityMap();
                xpServerCollectionSource1.Reload();

            }
        }
Ejemplo n.º 2
0
        private void btnAlter_Click(object sender, EventArgs e)
        {
            if (selection.SelectedCount == 1)
            {
                int RowIndex = selection.GetSelectedRowIndex(0);
                int RowHandle = gridView1.GetRowHandle(RowIndex);
                string strSPXXID = gridView1.GetRowCellDisplayText(RowHandle, colSPXXID).ToString().Trim();
                selection.ClearSelection();
                FrmGoodsAdd from = new FrmGoodsAdd(strSPXXID);
                if (from.ShowDialog() == DialogResult.OK)
                {
                    unitOfWork1.DropIdentityMap();
                    xpServerCollectionSource1.Reload();

                }

            }
            else
            {
                MessageBox.Show("请先选择一个要修改的商品");
            }
        }