コード例 #1
0
        private void Button_Click_2(object sender, RoutedEventArgs e)
        {
            Izmena   izmena   = new Izmena();
            proverka proverka = new proverka();

            _12.Text = proverka.check(_12.Text);
            _22.Text = proverka.check(_22.Text);
            _32.Text = proverka.check(_32.Text);
            _42.Text = proverka.check(_42.Text);
            if (izmena.ize(_12.Text))
            {
                _10.Text = _12.Text;
                _12.Text = "0";
            }
            if (izmena.ize(_22.Text))
            {
                _20.Text = _22.Text;
                _22.Text = "0";
            }
            if (izmena.ize(_32.Text))
            {
                _30.Text = _32.Text;
                _32.Text = "0";
            }
            if (izmena.ize(_42.Text))
            {
                _40.Text = _42.Text;
                _42.Text = "0";
            }
        }
コード例 #2
0
        public IActionResult Izmena(Izmena i)
        {
            connectionString();
            con.Open();
            com.Connection  = con;
            com.CommandText = "UPDATE zauzece SET id='" + i.Id + "',idGost='" + i.IdGost + "',idSoba='" + i.IdSoba + "',datumOd='" + i.DatumOd + "',datumDo='" + i.DatumDo + "'WHERE id='" + i.Id + "'";
            com.ExecuteNonQuery();
            con.Close();

            return(View());
        }