Beispiel #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            frmAddEditAnotherPayments frmAdd = new frmAddEditAnotherPayments();

            frmAdd.ShowDialog();
            GetData();
        }
Beispiel #2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (dgAnotherPayments.CurrentCell != null)
            {
                int    idPay   = int.Parse(dgAnotherPayments.Rows[dgAnotherPayments.CurrentRow.Index].Cells["id"].Value.ToString());
                string namePay = dgAnotherPayments.Rows[dgAnotherPayments.CurrentRow.Index].Cells["cName"].Value.ToString();

                frmAddEditAnotherPayments frmEdit = new frmAddEditAnotherPayments(idPay, namePay);
                frmEdit.ShowDialog();

                GetData();
            }
        }