Beispiel #1
0
        private void pictureBox1_Click(object sender, EventArgs e)
        {
            this.Hide();
            HastaKayit hasta = new HastaKayit();

            hasta.Show();
        }
Beispiel #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            HastaKayit      hastaKayit      = new HastaKayit();
            HastaGuncelleme hastaGuncelleme = new HastaGuncelleme();

            hastaGuncelleme.Show();
            hastaGuncelleme.Visible = false;
            hastaKayit.Show();
            hastaKayit.Visible = false;
            //hastaGuncelleme = new HastaGuncelleme();
            //  hastaGuncelleme.Show();
            // hastaGuncelleme.Visible = false;
            // HastaKayit.Show();
            // HastaKayit.Visible = false;
            tablo_Doldur();
        }
        public void veriTemizle(string mesaj, string baslik, bool guncellemeDurumu, List <string> satir, string guncellikveri = "", int isaretliSatir = 1)
        {
            hasta      = new HastaKayit();
            hastaTablo = new HastaTablo();

            DialogResult dialogResult = new DialogResult();

            dialogResult = MessageBox.Show(satir[isaretliSatir] + " \n" + mesaj, baslik, MessageBoxButtons.YesNo);
            if (dialogResult == DialogResult.Yes)
            {
                //Önce dosya içini tamamen temizliyorum sadece başlıkları silmiyorum.
                //Sonra tüm verileri yenilerle beraber yazınca güncelleme oluyor.

                TextWriter tw        = new StreamWriter(Application.StartupPath.ToString() + @"\diabetes_data_upload.csv");
                string     basliklar = satir[0];
                tw.Write("");
                tw.Close();
                for (int i = 0; i < satir.Count; i++)
                {
                    if (i == 0)
                    {
                        satir[i] = basliklar;
                    }
                    if (isaretliSatir == i)
                    {
                        if (guncellemeDurumu == true)
                        {
                            satir[i] = guncellikveri;
                            hasta.excelYazdir(satir[i]);
                        }
                        else
                        {
                            satir[i] = "";
                        }
                    }
                    else
                    {
                        hasta.excelYazdir(satir[i]);
                    }
                }

                hastaTablo.Show();
            }
        }