Example #1
0
        private void btnEnter_Click(object sender, EventArgs e)
        {
            if (check == false)
            {
                if (txtLogin.Text == "Vladislav" && txtPassword.Text == "Razhnov")
                {
                    frmMain frm = new frmMain();

                    frm.Show();
                }
                check = true;
            }
        }
Example #2
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                bool myself = chbMyself.Checked;

                int[] arrayProperty = new int[13];
                arrayProperty[0] = int.Parse(txtNumber.Text);
                if (rbMain.Checked == true)
                {
                    arrayProperty[1] = 1;
                }
                else
                {
                    arrayProperty[1] = 0;
                }
                arrayProperty[2] = int.Parse(txtYear.Text);
                arrayProperty[3] = int.Parse(txtAllarea.Text);
                arrayProperty[4] = int.Parse(txtLivearea.Text);
                arrayProperty[5] = int.Parse(txtbreakBuild.Text);
                arrayProperty[6] = int.Parse(txtCoast.Text);
                arrayProperty[7] = int.Parse(txtFloor.Text);
                arrayProperty[8] = int.Parse(txtRooms.Text);
                arrayProperty[9] = int.Parse(txtRoomsArea.Text);
                arrayProperty[10] = int.Parse(txtRoomsHight.Text);
                arrayProperty[11] = int.Parse(txtRoomsFloor.Text);
                arrayProperty[12] = int.Parse(cmbNumberBuild.Text);

                List<string> listProperty = new List<string>();
                listProperty.Add(txtWhyBuild.Text);
                listProperty.Add(txtWall.Text);
                listProperty.Add(txtRoomsWhy.Text);

                frmMain frm = new frmMain();
                frm.addLiters(myself, arrayProperty, listProperty);

                this.Close();
            }
            catch
            {
                MessageBox.Show("Не все поля заполнены. Проверьте правильность ввода", "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
            }
        }
Example #3
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            try
            {

                DateTime eventDate = dtpEvent.Value;
                bool light = chbLight.Checked
                , water = chbWater.Checked
                , hot = chbHot.Checked;

                int[] arrayProperty = new int[9];
                arrayProperty[0] = int.Parse(txtNumber.Text);
                arrayProperty[1] = int.Parse(txtNumberKv.Text);
                arrayProperty[2] = int.Parse(txtSquare.Text);
                arrayProperty[3] = int.Parse(txtSquareF.Text);
                arrayProperty[4] = int.Parse(txtSquareFull.Text);
                arrayProperty[5] = int.Parse(txtSquareScver.Text);
                arrayProperty[6] = int.Parse(txtSquareGreen.Text);
                arrayProperty[7] = int.Parse(txtSquareGarden.Text);
                arrayProperty[8] = int.Parse(txtBad.Text);

                List<string> listProperty = new List<string>();
                listProperty.Add(txtAdress.Text);
                listProperty.Add(txtArea.Text);
                listProperty.Add(txtMore.Text);

                frmMain frm = new frmMain();
                frm.addBuilds(arrayProperty, listProperty, eventDate, light, water, hot);

                this.Close();
            }
            catch (Exception)
            {
                MessageBox.Show("Не все поля заполнены. Проверьте правильность ввода", "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
            }
        }