Esempio n. 1
0
        private void btnModifyProduct_Click(object sender, EventArgs e)
        {
            int count = this.gdvInfo.SelectedRowsCount;

            if (count == 0)
            {
                MessageBox.Show("请先搜索/刷新并选择需要修改的用户行", "错误!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            string paramProductID        = this.gdvInfo.GetFocusedRowCellValue("product_id").ToString();
            string ProductClassId        = this.gdvInfo.GetFocusedRowCellValue("product_class_id").ToString();
            string paramProductClassName = this.gdvInfo.GetFocusedRowCellValue("product_class_name").ToString();
            string paramProductName      = this.gdvInfo.GetFocusedRowCellValue("product_name").ToString();
            string paramProductSpec      = this.gdvInfo.GetFocusedRowCellValue("product_spec").ToString();
            string paramUnitName         = this.gdvInfo.GetFocusedRowCellValue("product_unit_name").ToString();
            string paramEmployeeName     = this.gdvInfo.GetFocusedRowCellValue("createby").ToString();
            string paramRemark           = this.gdvInfo.GetFocusedRowCellValue("remark").ToString();

            frmProductListAdd MyfrmProductAdd = new frmProductListAdd(paramProductID, ProductClassId, paramProductClassName, paramProductName, paramProductSpec, paramUnitName, paramEmployeeName, paramRemark);

            MyfrmProductAdd.Tag = this.Tag;
            DialogResult dr = new DialogResult();

            dr = MyfrmProductAdd.ShowDialog();
            if (dr == DialogResult.OK)
            {
                btnSearch_Click(sender, e);
            }
        }
Esempio n. 2
0
        private void btnAddProduct_Click(object sender, EventArgs e)
        {
            frmProductListAdd MyfrmProductAdd = new frmProductListAdd();

            MyfrmProductAdd.Tag = this.Tag;

            DialogResult dr = new DialogResult();

            dr = MyfrmProductAdd.ShowDialog();
            if (dr == DialogResult.OK)
            {
                btnSearch_Click(sender, e);
            }
        }