Пример #1
0
        private void button1_Click_1(object sender, EventArgs e)
        {
            try
            {
                //Test();
                comboBox3.Items.Clear();
                if (textBox1.Text.Length == 0 || textBox2.Text.Length == 0)
                    throw new Exception("Ingrese el Usuario y la Contraseña");
                Conexion c = new Conexion();
                comboBox3.Enabled = true;
                List<string> bases = new List<string>();
                if (comboBox4.SelectedIndex == -1)
                    server = comboBox4.Text;
                else
                    server = comboBox4.SelectedItem.ToString();

                bases = c.BasesDatos(server, textBox1.Text, textBox2.Text);
                for (int i = 0; i < bases.Count; i++)
                {
                    comboBox3.Items.Add(bases[i]);
                }

                textBox1.Enabled = false;
                textBox2.Enabled = false;
                comboBox4.Enabled = false;
                button1.Enabled = false;
                user = textBox1.Text;
                pass = textBox2.Text;
                button3.Enabled = true;
                comboBox4.Items.Clear();

            }

            catch (Exception E)
            {

                MessageBox.Show(E.Message);
            }
        }
Пример #2
0
 public void LlenarLocales()
 {
     Conexion c = new Conexion();
     servidores = c.Locals();
 }
Пример #3
0
 public void LlenarLista()
 {
     Conexion c = new Conexion();
     servidores = c.GetServersNet();
 }
Пример #4
0
        private void button3_Click_1(object sender, EventArgs e)
        {
            Form2 f = new Form2();
            f.Text=new Processor().Test();

            c = new Conexion();
            bd = comboBox3.SelectedItem.ToString();
            new Conexion().Check_Owner(server, bd, user, pass);
            f.Servidor = server;
            f.BD = bd;

            f.Usuario = user;
            f.Pass = pass;
            Hide();
            f.ShowDialog();
        }
Пример #5
0
        void worker_DoWork(object sender, DoWorkEventArgs e)
        {
            if (columna == "Imprimir")
            {

                Conexion c = new Conexion();
                Form3 f = new Form3();

                rf3.Nominas = c.Imp(id, servidor, bd, usuario, pass);
                rf3.Enc1 = c.Enc1(servidor, bd, usuario, pass) + "\n" + c.DatosUnidad(servidor, bd, usuario, pass)+
                    "\n"+numdoc+"-"+nombdoc+"\n"+"Periodo de Pago: "+periodop;
                rf3.Enc2 = "INSTRUM. DE PAGO: No.__  Fecha:______________" + fecha + "\n" + c.DatosElab(servidor, bd, usuario, pass);
                rf3.Areas = c.areas;
                rf3.Text =Text;
                rf3.Bonificaciones = c.Bonificaciones(servidor, bd, usuario, pass);

                //f.Nominas = c.Imp(id, servidor, bd, usuario, pass);
                // f.Areas = c.areas;
                //f.ShowDialog();

            }
        }
Пример #6
0
 private void radDateTimePicker1_ValueChanged(object sender, EventArgs e)
 {
     Conexion c = new Conexion();
     List<object[]> nominas = c.Nominas(servidor, bd, usuario, pass, radDateTimePicker1.Value);
     if (nominas.Count > 1)
     {
         FillGrid(nominas,radGridView1,true);
         OcultarColum(new[] { radGridView1.Columns[0].Name }, radGridView1);
     }
 }
Пример #7
0
        private void RadForm3_Load(object sender, EventArgs e)
        {
            nominas = Nominas;
            areas = Areas;
            enc1 = Enc1;
            enc2 = Enc2;
            bonificaciones = Bonificaciones;
            //DataSet d = new DataSet();

            //d.Tables.Add(nominas[0]);
            //d.Tables.Add(nominas[1]);
            //d.Relations.Add("Detalle", d.Tables[0].Columns["id"], d.Tables[1].Columns["id"]);

            //gridControl1.DataSource = d.Tables[0];
            //gridView1.Columns["id"].Visible = false;

               FillGrid();
               radGridView1.Columns["id"].IsVisible = false;
               radGridView1.Columns["Area"].IsVisible = false;
            radGridView1.BestFitColumns(BestFitColumnMode.AllCells);
            Formartear();
            //gridView1.RowSeparatorHeight = 5;
            //gridView1.BestFitColumns();

            Conexion c = new Conexion();
        }