Exemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     textBox1.Enabled = false;
     textBox2.Enabled = false;
     button1.Enabled = false;
     button2.Enabled = false;
     button3.Enabled = false;
     button1.Text = "Загрузка...";
     db=new dbBind(@"Data Source=(LocalDB)\v11.0;AttachDbFilename="+textBox2.Text+";Integrated Security=True;Connect Timeout=30");
     control = new Control(db, fEmail.name.Text, fEmail.host.Text, fEmail.pass.Text, fEmail.popadr.Text, fEmail.popport.Text, fEmail.smtpadr.Text, fEmail.smtpprot.Text);
     Connecton = new connectionControl(textBox1.Text, db, control);
     button1.Text = "Сервер запущен";
 }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            db=new dbBind(@"Data Source=(LocalDB)\v11.0;AttachDbFilename="+textBox2.Text+";Integrated Security=True;Connect Timeout=30");
            Connecton = new connectionControl(textBox1.Text);

            foreach(var a in db.tConsulters)
            {
                log(a.Id.ToString());
                log(a.firstname);
            }

            int id = 0;
            //Consulters con = db.tConsulters.Where(a => a.Id == id).FirstOrDefault();
            //consulters_salary cs = new consulters_salary(con, new DateTime(1900, 10, 10), 10);
            //db.tConsultersSalary.InsertOnSubmit(cs);
            //db.SubmitChanges();

            foreach (var a in db.tConsultersSalary)
            {
                log(a.overal_salary.ToString());
            }

            button1.Enabled = false;
        }