예제 #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            frmSupplierAdd myfrmSupplierAdd = new frmSupplierAdd();

            if (myfrmSupplierAdd.ShowDialog() == DialogResult.Yes)
            {
                btnSearch_Click(sender, e);
            }
        }
예제 #2
0
        private void btnMod_Click(object sender, EventArgs e)
        {
            int count = this.gdvInfo.SelectedRowsCount;

            if (count == 0)
            {
                MessageBox.Show("请先搜索/刷新并选择需要修改的行", "错误!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            string SupplierID     = this.gdvInfo.GetFocusedRowCellValue("supplier_id").ToString();
            string SupplierName   = this.gdvInfo.GetFocusedRowCellValue("name").ToString();
            string Address        = this.gdvInfo.GetFocusedRowCellValue("address").ToString();
            string Phone          = this.gdvInfo.GetFocusedRowCellValue("phone").ToString();
            string Fax            = this.gdvInfo.GetFocusedRowCellValue("fax").ToString();
            string PostalCode     = this.gdvInfo.GetFocusedRowCellValue("postal_code").ToString();
            string ConstactPerson = this.gdvInfo.GetFocusedRowCellValue("constact_person").ToString();

            frmSupplierAdd myfrmSupplierAdd = new frmSupplierAdd(SupplierID, SupplierName, Address, Phone, Fax, PostalCode, ConstactPerson);

            if (myfrmSupplierAdd.ShowDialog() == DialogResult.Yes)
            {
                btnSearch_Click(sender, e);
            }
        }