private void button2_Click(object sender, EventArgs e) { using (var form = new ClientSearchForm()) { var result = form.ShowDialog(); if (result == DialogResult.OK) { curentuserid = form.clientID; var client = c.clients.FirstOrDefault(c => c.Id == curentuserid); clientNametextbox.Text = client.Name; ClientAdressTextbox.Text = client.Address; serviceNumeric.Value = Convert.ToDecimal(client.DelevaryService); AddeddateTimePicker.Value = client.DateAdded; firstPhonetextbox.Text = client.FirstPhoneNumner; seceondPhoneTextbox.Text = client.SecondPhoneNumner; } } }
private void toolStripButton6_Click(object sender, EventArgs e) { ClientSearchForm ClientSearchFormm = new ClientSearchForm(); OpenForm(ClientSearchFormm); }