public ClientAddressForm(int clientId, int addressId, ClientRowForm cAddForm, int status)
 {
     InitializeComponent();
     this.clientId  = clientId;
     this.addressId = addressId;
     this.cAddForm  = cAddForm;
     this.status    = status;
 }
        private void BtnAdd_Click(object sender, EventArgs e)
        {
            ClientRowForm paf = new ClientRowForm(0, this, 0);

            paf.GetInitialValue();
            FormState.PreviousPage = this;
            paf.Show();
            this.Hide();
        }
        private void BtnEdit_Click(object sender, EventArgs e)
        {
            if (dataPartners.Rows.Count != 0)
            {
                int i          = dataPartners.SelectedCells[0].RowIndex;
                int selectedId = Convert.ToInt32(dataPartners.Rows[i].Cells[0].Value.ToString());

                ClientRowForm caf = new ClientRowForm(selectedId, this, 1);
                caf.PopulateForm("", "", "", selectedId);
                caf.GetInitialValue();
                FormState.PreviousPage = this;
                caf.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Nu se poate edita niciun client deoarece nu exista vreun client", "Atentie", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
        }