コード例 #1
0
ファイル: EditReserv.cs プロジェクト: biletnam/Hotel-1
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         VisibleReserv     vc  = new VisibleReserv();
         Mapping.Metrezerv d   = new Mapping.Metrezerv();
         string[]          str = comboBox1.Items[comboBox1.SelectedIndex].ToString().Split(new char[] { ' ' });
         d.Edit(Program.Pole.id, Convert.ToInt32(str[0]), Convert.ToInt32(numericUpDown1.Value));
         this.Close();
     }
     catch (ArgumentOutOfRangeException) { MessageBox.Show("Не все поля заполнены"); }
     catch { MessageBox.Show("Error"); }
 }
コード例 #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         VisibleReserv     vc = new VisibleReserv();
         Mapping.Metrezerv d  = new Mapping.Metrezerv();
         var linq             = from n in dbdopuslugi.veshi
                                where n.nazvanie == comboBox1.Items[comboBox1.SelectedIndex].ToString()
                                select n;
         foreach (var i in linq)
         {
             d.ADD(i.id, Convert.ToInt32(numericUpDown1.Value));
             break;
         }
         this.Close();
     }
     catch (ArgumentOutOfRangeException) { MessageBox.Show("Не все поля заполнены"); }
     catch { MessageBox.Show("Error"); }
 }
コード例 #3
0
 private void toolStripMenurezerv_Click(object sender, EventArgs e)
 {
     vnesenieinfBD.veshi.Reserv.VisibleReserv visibleclient = new vnesenieinfBD.veshi.Reserv.VisibleReserv();
     visibleclient.ShowDialog();
 }