private void button1_Click(object sender, EventArgs e) { FrmDetailPurchaseContract detailPurchaseContract = new FrmDetailPurchaseContract(); detailPurchaseContract.MdiParent = this.MdiParent; detailPurchaseContract.Show(); this.Close(); }
private void Edit_Click(object sender, EventArgs e) { // if (dgvPurchaseContract.SelectedRows.Count > 0 && (bool)dgvPurchaseContract.SelectedRows[0].Cells["Approve"].Value == false) // { // var id = (int)dgvPurchaseContract.SelectedRows[0].Cells["PurchaseContractID"].Value; // FrmDetailPurchaseContract detailSeller = new FrmDetailPurchaseContract(id); // detailSeller.SetPurchaseContract(id); // detailSeller.Show(); // } // //this.Close(); // else{ // this.Close(); // MessageBox.Show("You cannot Edit"); // } if (dgvPurchaseContract.SelectedRows.Count > 0) { var id = (int)dgvPurchaseContract.SelectedRows[0].Cells["PurchaseContractID"].Value; FrmDetailPurchaseContract detailSeller = new FrmDetailPurchaseContract(id); detailSeller.SetPurchaseContract(id); detailSeller.Show(); } this.Close(); }