コード例 #1
0
        public void addCustomerToolStripMenuItem_Click(object sender, EventArgs e)
        {
            panel1.Visible = false;
            frmAddCustomer obj = new frmAddCustomer(0, "");

            obj.MdiParent = this;
            obj.Show();
        }
コード例 #2
0
 private void editToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (dgvListOfCustomer.CurrentRow.Index > -1)
     {
         DataGridViewRow row = dgvListOfCustomer.Rows[dgvListOfCustomer.CurrentCell.RowIndex];
         frmAddCustomer  obj = new frmAddCustomer(Convert.ToInt32(row.Cells["CustomerID"].Value), "");
         obj.ShowDialog();
     }
 }
コード例 #3
0
 private void btnEditCustomer_Click(object sender, EventArgs e)
 {
     if (dgvListOfCustomer.CurrentRow.Index >= 0)
     {
         frmAddCustomer obj = new frmAddCustomer(Convert.ToInt32(dgvListOfCustomer.Rows[dgvListOfCustomer.CurrentRow.Index].Cells["Cust ID"].Value.ToString()), "List");
         obj.ShowDialog();
     }
     else
     {
         MessageBox.Show("Select Row First.");
     }
 }
コード例 #4
0
        private void btnAddCustomer_Click(object sender, EventArgs e)
        {
            frmAddCustomer obj = new frmAddCustomer(0, "Product");

            obj.ShowDialog();
        }