コード例 #1
0
        private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            try{
                DataGridViewRow dr = dataGridView1.SelectedRows[0];
                this.Hide();
                frmSuppliers frm = new frmSuppliers();
                frm.Show();
                frm.txtSupplierID.Text   = dr.Cells[0].Value.ToString();
                frm.txtSupplierName.Text = dr.Cells[1].Value.ToString();
                frm.txtAddress.Text      = dr.Cells[2].Value.ToString();
                frm.txtCity.Text         = dr.Cells[3].Value.ToString();
                frm.txtContactNo.Text    = dr.Cells[4].Value.ToString();
                frm.txtContactNo1.Text   = dr.Cells[5].Value.ToString();
                frm.txtEmail.Text        = dr.Cells[6].Value.ToString();
                frm.txtNotes.Text        = dr.Cells[7].Value.ToString();
                frm.btnUpdate.Enabled    = true;
                frm.btnDelete.Enabled    = true;
                frm.btnSave.Enabled      = false;
                frm.txtSupplierName.Focus();
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
コード例 #2
0
        private void frmSuppliersRecord_FormClosing(object sender, FormClosingEventArgs e)
        {
            this.Hide();
            frmSuppliers frm = new frmSuppliers();

            frm.Show();
        }
コード例 #3
0
        private void supplierToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmSuppliers frm = new frmSuppliers();

            frm.Show();
        }
コード例 #4
0
        private void profileEntryToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            frmSuppliers frm = new frmSuppliers();

            frm.Show();
        }