private void save_button_Click(object sender, EventArgs e) { int breedId = Convert.ToInt32(breed_dataGridView.SelectedRows[0].Cells["idDataGridViewTextBoxColumn"].Value); string breed = breed_dataGridView.SelectedRows[0].Cells["breedDataGridViewTextBoxColumn"].Value.ToString(); if (newPet) { AddPetForm APF = this.Owner as AddPetForm; if (APF != null) { APF.SetBreed(breedId, breed); } this.Close(); } if (editPet) { EditPetForm EPF = this.Owner as EditPetForm; if (EPF != null) { EPF.SetBreed(breedId, breed); } this.Close(); } if (petsList) { PetsForm PF = this.Owner as PetsForm; if (PF != null) { PF.SetFilterBreed(breedId, breed); } this.Close(); } }
private void addClient_button_Click(object sender, EventArgs e) { AddPetForm APF = new AddPetForm(user); APF.ShowDialog(); search_textBox.Clear(); this.v_petsTableAdapter.FillByAlive(this.monamurDBDataSet.V_pets); }
private void add_button_Click(object sender, EventArgs e) { AddPetForm APF = new AddPetForm(user); Container container = this.MdiParent as Container; container.MakeFormHooks(APF); APF.ShowDialog(); this.v_petsTableAdapter.Fill(this.monamurDBDataSet.V_pets); }
private void save_button_Click(object sender, EventArgs e) { int clientId = Convert.ToInt32(client_dataGridView.SelectedRows[0].Cells["idDataGridViewTextBoxColumn"].Value); string clientFio = client_dataGridView.SelectedRows[0].Cells["fioDataGridViewTextBoxColumn"].Value.ToString(); if (newPet) { AddPetForm APF = this.Owner as AddPetForm; if (APF != null) { APF.SetClient(clientId, clientFio); } } else { EditPetForm EPF = this.Owner as EditPetForm; if (EPF != null) { EPF.SetClient(clientId, clientFio); } } this.Close(); }