private void metropruchases_Click_1(object sender, EventArgs e) { UserControl_purchase_form viepur = new UserControl_purchase_form(); contentpanel.Controls.Clear(); contentpanel.Controls.Add(viepur); }
private void label14_Click(object sender, EventArgs e) { UserControl_purchase_form view = new UserControl_purchase_form(); contentpanel.Controls.Clear(); contentpanel.Controls.Add(view); }
//Stock private void purchaseToolStripMenuItem_Click(object sender, EventArgs e) { UserControl_purchase_form stopur = new UserControl_purchase_form(); contentpanel.Controls.Clear(); contentpanel.Controls.Add(stopur); }
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == dataGridView1.Columns["col_return"].Index && e.RowIndex >= 0) { Control ctrl = this.Parent; supplier_name = Convert.ToString(dataGridView1.Rows[e.RowIndex].Cells["col_supplier"].Value); bill_no = Convert.ToString(dataGridView1.Rows[e.RowIndex].Cells["col_bill_no"].Value); purchase_date = Convert.ToDateTime(dataGridView1.Rows[e.RowIndex].Cells["col_purhasedate"].Value); UserControl_purchase_form upf = new UserControl_purchase_form(); ctrl.Controls.Clear(); ctrl.Controls.Add(upf); } else if (e.ColumnIndex == dataGridView1.Columns["col_payment"].Index && e.RowIndex >= 0) { //Control ctrl = this.Parent; //supplier_name = Convert.ToString(dataGridView1.Rows[e.RowIndex].Cells["col_supplier"].Value); //bill_no = Convert.ToString(dataGridView1.Rows[e.RowIndex].Cells["col_bill_no"].Value); //PurchasePay upf = new PurchasePay(); //upf.Show(); } }