コード例 #1
0
ファイル: SelectBreedForm.cs プロジェクト: vberesnev/Monamur
        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();
            }
        }
コード例 #2
0
        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);
        }
コード例 #3
0
ファイル: PetsForm.cs プロジェクト: vberesnev/Monamur
        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);
        }
コード例 #4
0
ファイル: SelectClientForm.cs プロジェクト: vberesnev/Monamur
        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();
        }