Exemple #1
0
        private void drgvEmployer_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            Account selectedAccount = drgvEmployer.Rows[drgvEmployer.CurrentCell.RowIndex].DataBoundItem as Account;

            if (selectedAccount == null)
            {
                return;
            }

            FormEmployerAddEdit formNewRestaurant = new FormEmployerAddEdit(this, FormEmployerAddEdit.ACTION_TYPE.VIEW);

            formNewRestaurant.SetDataForm(selectedAccount);
            formNewRestaurant.ShowDialog();
        }
Exemple #2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            Account selectedAccount = drgvEmployer.Rows[drgvEmployer.CurrentCell.RowIndex].DataBoundItem as Account;

            if (selectedAccount == null)
            {
                MessageBox.Show("Bạn phải chọn nhà hàng !!!", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            FormEmployerAddEdit formNewRestaurant = new FormEmployerAddEdit(this, FormEmployerAddEdit.ACTION_TYPE.EDIT);

            formNewRestaurant.SetDataForm(selectedAccount);
            formNewRestaurant.ShowDialog();
        }
Exemple #3
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            FormEmployerAddEdit formNewRestaurant = new FormEmployerAddEdit(this, FormEmployerAddEdit.ACTION_TYPE.CREATE);

            formNewRestaurant.ShowDialog();
        }