private void BtnPartners_Click(object sender, EventArgs e) { ClientsListForm partners = new ClientsListForm(); partners.Show(); this.Hide(); partners.FormClosed += Partners_FormClosed; }
private void BtnBack_Click(object sender, EventArgs e) { string message = "Apasa DA daca doresti sa salvezi toate modificarile facute. Apasa Nu daca doresti sa nu salvezi nimic"; string title = "Atentie"; MessageBoxButtons buttons = MessageBoxButtons.YesNo; ClientModel client = new ClientModel() { ClientId = clientId, ClientName = txtClientName.Text, ClientSurname = txtClientSurName.Text, ClientCode = txtClientCode.Text, PhoneNo = txtClientPhone.Text, Email = txtClientEmail.Text, status = this.statusCL }; if (!IsModify()) { DialogResult result = MessageBox.Show(message, title, buttons, MessageBoxIcon.Information); if (result == DialogResult.No) { cform.Show(); this.Hide(); } else { SaveClient(); cform.UpdateClientsDataGridView(client); cform.Show(); this.Hide(); } } else { cform.UpdateClientsDataGridView(client); cform.Show(); this.Hide(); } }