Esempio n. 1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            FrmDetailSalesContract detailPSalesContract = new FrmDetailSalesContract();

            detailPSalesContract.MdiParent = this.MdiParent;
            detailPSalesContract.Show();
            this.Close();
        }
Esempio n. 2
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     if (dgvSalesContract.SelectedRows.Count > 0 && (bool)dgvSalesContract.SelectedRows[0].Cells["Approve"].Value == false)
     {
         var id = (int)dgvSalesContract.SelectedRows[0].Cells["SalesContractID"].Value;
         FrmDetailSalesContract detailSales = new FrmDetailSalesContract(id);
         detailSales.SetSalesContract(id);
         detailSales.Show();
     }
     else
     {
         this.Close();
         MessageBox.Show("You cannot Edit");
     }
 }