Пример #1
0
 private void AddHistory_Click(object sender, EventArgs e)
 {
     if (LabelAimodoti.Text != " - - - ")
     {
         HistoryForm formHistory = new HistoryForm();
         formHistory.IDaimodoti = int.Parse(AimodotisAnazitisis[2].ToString());
         if (radioButtonEthelontika.Checked) formHistory.katigoriaAim = radioButtonEthelontika.Text;
         else if (radioButtonAstheni.Checked) formHistory.katigoriaAim = radioButtonAstheni.Text;
         else formHistory.katigoriaAim = radioButtonSyllogo.Text;
         if (formHistory.ShowDialog() == DialogResult.OK)
         {
             IDHistory = formHistory.IDHistory;
         }
     }
     else
     {
         MessageBox.Show("Κάντε εύρεση του Αιμοδότη Πρώτα !", "", MessageBoxButtons.OK);
     }
 }
Пример #2
0
        private void dothesearchHistory()
        {
            int IdAimodotiSearch;
            bool is_int = int.TryParse(textBoxHistoryFound.Text, out IdAimodotiSearch);
            if (is_int)
            {
                if (textBoxHistoryFound.Text != "")
                {
                    long Idistorikou;
                    this.aimodotesTableAdapter1.Fill(ptuxiakiDatabaseDataSet11.Aimodotes);
                    PtuxiakiDatabaseDataSet1.AimodotesRow Aimodotis = ptuxiakiDatabaseDataSet11.Aimodotes.FindByID(long.Parse(textBoxHistoryFound.Text));
                    if (Aimodotis != null)
                    {
                        FormSelectHistory SelectHistory = new FormSelectHistory();
                        SelectHistory.IDaimodoti = Aimodotis.ID;

                        if (SelectHistory.ShowDialog() == DialogResult.OK)
                        {
                            Idistorikou = SelectHistory.IDistorikou;
                            HistoryForm HistoryShowForm = new HistoryForm();
                            HistoryShowForm.ShowOnly = true;
                            HistoryShowForm.Idistorikou = Idistorikou;
                            HistoryShowForm.Show();
                        }
                    }
                    if (Aimodotis == null)
                    {
                        MessageBox.Show("Δεν βρέθηκε ο Αιμοδότης!!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    }
                }
            }
            else
            {
                MessageBox.Show("Δώστε Κωδικό Αιμοδότη για Αναζήτηση", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }