Пример #1
0
        private void btnYeni_Click(object sender, EventArgs e)
        {
            switch (btnIndex)
            {
            case 2:
                FirmalarForm = new FIRMALAR(0, "", "", "", "");
                FirmalarForm.ShowDialog();
                dt = Firmalar.FirmalariGetir();
                dgvGenel.DataSource = dt;
                break;

            case 3:
                DonanimTurleriForm = new DONANIM_TURLERI(0, "");
                DonanimTurleriForm.ShowDialog();
                dt = DonanimTurleri.DonanimTurleriniGetir();
                dgvGenel.DataSource = dt;
                break;

            case 4:
                LisansTipleriForm = new LISANS_TIPLERI(0, "");
                LisansTipleriForm.ShowDialog();
                dt = LisansTipleri.LisansTipleriniGetir();
                dgvGenel.DataSource = dt;
                break;

            case 5:
                TeknikServisFirmalariForm = new TEKNIK_SERVIS_FIRMALARI(0, "", "", "", "", "", "");
                TeknikServisFirmalariForm.ShowDialog();
                dt = ServisFirmalari.ServisFirmalariniGetir();
                dgvGenel.DataSource = dt;
                break;

            case 6:
                GonderimSekilleriForm = new GONDERIM_SEKILLERI(0, "");
                GonderimSekilleriForm.ShowDialog();
                dt = GonderimSekilleri.GonderimSekilleriniGetir();
                dgvGenel.DataSource = dt;
                break;

            case 7:
                ServisSekilleriForm = new SERVIS_SEKILLERI(0, "");
                ServisSekilleriForm.ShowDialog();
                dt = ServisSekilleri.ServisSekilleriniGetir();
                dgvGenel.DataSource = dt;
                break;

            case 8:
                UyelerForm = new UYELER(0, "", "", "", "", "");
                UyelerForm.ShowDialog();
                dt = Uyeler.UyeleriGetir();
                dgvGenel.DataSource = dt;
                break;

            default:
                MessageBox.Show("Yanlış işlem seçimi.", "HATA!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                break;
            }
        }
Пример #2
0
        public void Guncelle()
        {
            switch (btnIndex)
            {
            case 2:
                FirmalarForm = new FIRMALAR(
                    Convert.ToInt32(dgvGenel.CurrentRow.Cells["FirmaId"].Value),
                    dgvGenel.CurrentRow.Cells["FİRMALAR"].Value.ToString(),
                    dgvGenel.CurrentRow.Cells["ADRES"].Value.ToString(),
                    dgvGenel.CurrentRow.Cells["VERGİ DAİRESİ"].Value.ToString(),
                    dgvGenel.CurrentRow.Cells["VERGİ NUMARASI"].Value.ToString()
                    );
                FirmalarForm.ShowDialog();
                dt = Firmalar.FirmalariGetir();
                dgvGenel.DataSource = dt;
                break;

            case 3:
                DonanimTurleriForm = new DONANIM_TURLERI(Convert.ToInt32(dgvGenel.CurrentRow.Cells["TurId"].Value), dgvGenel.CurrentRow.Cells["DONANIM TÜRLERİ"].Value.ToString());
                DonanimTurleriForm.ShowDialog();
                dt = DonanimTurleri.DonanimTurleriniGetir();
                dgvGenel.DataSource = dt;
                break;

            case 4:
                LisansTipleriForm = new LISANS_TIPLERI(Convert.ToInt32(dgvGenel.CurrentRow.Cells["TipId"].Value), dgvGenel.CurrentRow.Cells["LİSANS TİPLERİ"].Value.ToString());
                LisansTipleriForm.ShowDialog();
                dt = LisansTipleri.LisansTipleriniGetir();
                dgvGenel.DataSource = dt;
                break;

            case 5:
                TeknikServisFirmalariForm = new TEKNIK_SERVIS_FIRMALARI(Convert.ToInt32(dgvGenel.CurrentRow.Cells["ServisFirmaId"].Value), dgvGenel.CurrentRow.Cells["FİRMA ADI"].Value.ToString(), dgvGenel.CurrentRow.Cells["ADRES"].Value.ToString(), dgvGenel.CurrentRow.Cells["TEL"].Value.ToString(), dgvGenel.CurrentRow.Cells["FAX"].Value.ToString(), dgvGenel.CurrentRow.Cells["GSM"].Value.ToString(), dgvGenel.CurrentRow.Cells["E-MAİL"].Value.ToString());
                TeknikServisFirmalariForm.ShowDialog();
                dt = ServisFirmalari.ServisFirmalariniGetir();
                dgvGenel.DataSource = dt;
                break;

            case 6:
                GonderimSekilleriForm = new GONDERIM_SEKILLERI(Convert.ToInt32(dgvGenel.CurrentRow.Cells["GonderimSekliId"].Value), dgvGenel.CurrentRow.Cells["GÖNDERİM ŞEKİLLERİ"].Value.ToString());
                GonderimSekilleriForm.ShowDialog();
                dt = GonderimSekilleri.GonderimSekilleriniGetir();
                dgvGenel.DataSource = dt;
                break;

            case 7:
                ServisSekilleriForm = new SERVIS_SEKILLERI(Convert.ToInt32(dgvGenel.CurrentRow.Cells["ServisSekliId"].Value), dgvGenel.CurrentRow.Cells["SERVİS ŞEKİLLERİ"].Value.ToString());
                ServisSekilleriForm.ShowDialog();
                dt = ServisSekilleri.ServisSekilleriniGetir();
                dgvGenel.DataSource = dt;
                break;

            case 8:
                UyelerForm = new UYELER(Convert.ToInt32(dgvGenel.CurrentRow.Cells["UyeId"].Value), dgvGenel.CurrentRow.Cells["ROL"].Value.ToString(), dgvGenel.CurrentRow.Cells["AD"].Value.ToString(), dgvGenel.CurrentRow.Cells["SOYAD"].Value.ToString(), dgvGenel.CurrentRow.Cells["KULLANICI ADI"].Value.ToString(), dgvGenel.CurrentRow.Cells["ŞİFRE"].Value.ToString());
                UyelerForm.ShowDialog();
                dt = Uyeler.UyeleriGetir();
                dgvGenel.DataSource = dt;
                break;

            default:
                MessageBox.Show("Yanlış işlem seçimi.", "HATA!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                break;
            }
        }