private void btnViewUpdate_Click(object sender, EventArgs e)
        {
            viewUpdateContact viewUpdate = new viewUpdateContact(data.id);

            viewUpdate.ShowDialog(this);
            this.Close();
        }
        private void btnRecordDelete_Click(object sender, EventArgs e)
        {
            contactCommService commService = new contactCommService();
            int resultInt = commService.deleteContactComm(this.contactCommID);

            if (resultInt > 0)
            {
                MessageBox.Show("Silme işlemi başarılı", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information);

                viewUpdateContact view = (viewUpdateContact)Application.OpenForms["viewUpdateContact"];
                view.getContactComm(data.id);

                this.Close();
            }
        }
Exemplo n.º 3
0
        private void btnCommUpdate_Click(object sender, EventArgs e)
        {
            // ((CommTypes)cmbCommTypes.SelectedItem).Id;
            CommTypes comboBoxSelected = (CommTypes)cmbCommTypes.SelectedItem;

            contactCommService contactComm = new contactCommService();
            int resultInt = contactComm.updateContactComm(dataComm.id, comboBoxSelected.Id, txtCommValue.Text);

            if (resultInt > 0)
            {
                MessageBox.Show("Güncelleme işlemi başarılı", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information);

                viewUpdateContact viewUpdate = (viewUpdateContact)Application.OpenForms["viewUpdateContact"];
                viewUpdate.getContactComm(dataContact.id);

                this.Close();
            }
        }
        private void btnCommNew_Click(object sender, EventArgs e)
        {
            // ((CommTypes)cmbCommTypes.SelectedItem).Id
            CommTypes selectedComm = (CommTypes)cmbCommTypes.SelectedItem;

            contactCommService contactComm = new contactCommService();
            int resultInt = contactComm.addNewComm(data.id, selectedComm.Id, txtCommValue.Text);

            if (resultInt > 0)
            {
                MessageBox.Show("Kayıt Başarılı", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information);

                viewUpdateContact viewForm = (viewUpdateContact)Application.OpenForms["viewUpdateContact"];
                viewForm.getContactComm(data.id);

                // ((viewUpdateContact)Application.OpenForms["viewUpdateContact"]).getContactComm(data.id);

                this.Close();
            }
        }