Exemple #1
0
        public MyResForm(int id)
        {
            InitializeComponent();
            tm.Tick    += timer1_Tick;
            tm.Interval = 1000;
            tm.Enabled  = true;
            tm.Start();
            runnerId = id;
            SqlConnClass scc = new SqlConnClass();
            MyResForm    mrf = this;

            scc.UpdMyResForm(mrf, id);
        }
Exemple #2
0
        public RegEventForm(int id)
        {
            InitializeComponent();
            tm.Tick    += timer1_Tick;
            tm.Interval = 1000;
            tm.Enabled  = true;
            tm.Start();
            runnerId = id;
            SqlConnClass scc = new SqlConnClass();
            RegEventForm rf  = this;

            scc.RegEventLoad(rf);
            sumCalc();
        }
        public SponsorForm()
        {
            InitializeComponent();
            label19.Text = "$" + textBox2.Text;
            SponsorForm  sf  = this;
            SqlConnClass scc = new SqlConnClass();

            scc.ConectRunnerFoeSponsor(sf);

            tm.Tick    += timer1_Tick;
            tm.Interval = 1000;
            tm.Enabled  = true;
            tm.Start();
        }
Exemple #4
0
        private void button3_Click(object sender, EventArgs e)
        {
            if (textBox1.Text == "" || comboBox1.Text == "")
            {
                MessageBox.Show("Не все поля заполнены!!!");
            }
            else
            {
                SqlConnClass scc = new SqlConnClass();

                scc.InsDataFromRegistration(runnerId, DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), kit, summary, comboBox1.Text, Convert.ToInt32(textBox1.Text));

                ActiveForm.Hide();
                RegConfirm rf = new RegConfirm(runnerId);
                rf.ShowDialog();
                Close();
            }
        }
        //public List<string> ls;
        public ListOfChar()
        {
            InitializeComponent();
            tm.Tick    += timer1_Tick;
            tm.Interval = 1000;
            tm.Enabled  = true;
            tm.Start();
            SqlConnClass scc = new SqlConnClass();
            //dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
            //dataGridView1.AllowUserToAddRows = false;
            ListOfChar loc = this;



            scc.ListOfCharReader(loc);

            //ls = scc.listLs();
            //imgAdd();
        }
        private void button2_Click(object sender, EventArgs e)
        {
            SqlConnClass scc = new SqlConnClass();

            if (textBox2.Text == textBox3.Text)
            {
                if (textBox4.Text == "" && textBox5.Text == "" && textBox2.Text == "")
                {
                    scc.UpdateRecInRunner(label14.Text, rannerId, 0, textBox2.Text, textBox4.Text, textBox5.Text, comboBox1.Text, dateTimePicker1.Value.ToString("yyyy-MM-dd hh:mm:ss"), textBox7.Text, comboBox2.Text);
                }
                if (textBox4.Text != "" && textBox5.Text == "" && textBox2.Text == "")
                {
                    scc.UpdateRecInRunner(label14.Text, rannerId, 1, textBox2.Text, textBox4.Text, textBox5.Text, comboBox1.Text, dateTimePicker1.Value.ToString("yyyy-MM-dd hh:mm:ss"), textBox7.Text, comboBox2.Text);
                }
                if (textBox4.Text != "" && textBox5.Text != "" && textBox2.Text == "")
                {
                    scc.UpdateRecInRunner(label14.Text, rannerId, 2, textBox2.Text, textBox4.Text, textBox5.Text, comboBox1.Text, dateTimePicker1.Value.ToString("yyyy-MM-dd hh:mm:ss"), textBox7.Text, comboBox2.Text);
                }
                if (textBox4.Text == "" && textBox5.Text != "" && textBox2.Text == "")
                {
                    scc.UpdateRecInRunner(label14.Text, rannerId, 3, textBox2.Text, textBox4.Text, textBox5.Text, comboBox1.Text, dateTimePicker1.Value.ToString("yyyy-MM-dd hh:mm:ss"), textBox7.Text, comboBox2.Text);
                }
                if (textBox4.Text != "" && textBox5.Text != "" && textBox2.Text != "")
                {
                    scc.UpdateRecInRunner(label14.Text, rannerId, 4, textBox2.Text, textBox4.Text, textBox5.Text, comboBox1.Text, dateTimePicker1.Value.ToString("yyyy-MM-dd hh:mm:ss"), textBox7.Text, comboBox2.Text);
                }
                if (textBox4.Text == "" && textBox5.Text == "" && textBox2.Text != "")
                {
                    scc.UpdateRecInRunner(label14.Text, rannerId, 5, textBox2.Text, textBox4.Text, textBox5.Text, comboBox1.Text, dateTimePicker1.Value.ToString("yyyy-MM-dd hh:mm:ss"), textBox7.Text, comboBox2.Text);
                }
                if (textBox4.Text == "" && textBox5.Text != "" && textBox2.Text != "")
                {
                    scc.UpdateRecInRunner(label14.Text, rannerId, 6, textBox2.Text, textBox4.Text, textBox5.Text, comboBox1.Text, dateTimePicker1.Value.ToString("yyyy-MM-dd hh:mm:ss"), textBox7.Text, comboBox2.Text);
                }
                if (textBox4.Text != "" && textBox5.Text == "" && textBox2.Text != "")
                {
                    scc.UpdateRecInRunner(label14.Text, rannerId, 7, textBox2.Text, textBox4.Text, textBox5.Text, comboBox1.Text, dateTimePicker1.Value.ToString("yyyy-MM-dd hh:mm:ss"), textBox7.Text, comboBox2.Text);
                }
            }
        }
 private void button2_Click(object sender, EventArgs e)
 {
     if (textBox1.Text == "" || comboBox1.Text == "" || textBox3.Text == "" || textBox4.Text == "" || textBox5.Text == "" || textBox6.Text == "" || textBox7.Text == "" || label19.Text == "$0")
     {
         MessageBox.Show("Какие то поля не заполнены либо сумма равна 0!");
     }
     else
     {
         string   str;
         string[] str1;
         str  = comboBox1.Text;
         str1 = str.Split(' ');
         SqlConnClass scc = new SqlConnClass();
         SponsorForm  sf  = this;
         scc.SponsorAddRec(sf, str1[0], textBox1.Text, textBox2.Text);
         //scc.CharityForRunner(sf, str1[0]);
         ActiveForm.Hide();
         SponsConfirm sc = new SponsConfirm(comboBox1.Text, label20.Text, label19.Text);
         sc.ShowDialog();
         Close();
     }
 }