Example #1
0
        private void frmDemandRecord_FormClosing(object sender, FormClosingEventArgs e)
        {
            this.Hide();
            frmDemand frm = new frmDemand();

            frm.Show();
        }
Example #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            //this.Hide();
            frmDemand frm = new frmDemand();

            frm.Show();
        }
Example #3
0
        private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            try
            {
                DataGridViewRow dr = dataGridView1.SelectedRows[0];
                this.Hide();
                frmDemand frm = new frmDemand();
                frm.Show();
                frm.txtProductID.Text = dr.Cells[0].Value.ToString();
                frm.productName.Text  = dr.Cells[1].Value.ToString();
                frm.customerName.Text = dr.Cells[2].Value.ToString();
                frm.Address.Text      = dr.Cells[3].Value.ToString();
                frm.mobileNumber.Text = dr.Cells[4].Value.ToString();
                frm.advance.Text      = dr.Cells[5].Value.ToString();
                frm.quantity.Text     = dr.Cells[6].Value.ToString();
                frm.date.Text         = dr.Cells[7].Value.ToString();

                frm.btnUpdate.Enabled = true;
                frm.btnDelete.Enabled = true;
                frm.btnSave.Enabled   = false;
                frm.customerName.Focus();
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }