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