예제 #1
0
        public void agregar_historial(int inX)
        {
            Historial_Envios x = new Historial_Envios();

            // Console.WriteLine("SE CAMBIO A - - -  estado 2");
            x.historial(inX, stId_factura);
        }
 public void AnalizarDATA()
 {
     try
     {
         int inX = 0;
         foreach (DataGridViewRow dgRow in dataGridView2.Rows)
         {
             DataGridViewCheckBoxCell dgChk = (DataGridViewCheckBoxCell)dgRow.Cells[0];
             if (dgChk.Value == dgChk.FalseValue || dgChk.Value == null)
             {
                 dgRow.DefaultCellStyle.BackColor = System.Drawing.Color.Red;
                 Console.WriteLine("..1");
                 dgChk.Value = dgChk.TrueValue;
                 inX++;
             }
             else
             {
                 dgRow.DefaultCellStyle.BackColor = System.Drawing.Color.White;
                 Console.WriteLine("..2");
                 dgChk.Selected = true;
                 dgChk.Value    = dgChk.FalseValue;
             }
         }
         if (inX == 0)
         {
             Console.WriteLine("Todo limpio");
             //agregar reparando
             foreach (DataGridViewRow Fila in dataGridView3.Rows)// recorrer fila por fila
             {
                 Historial_Envios x = new Historial_Envios();
                 //// Console.WriteLine("SE CAMBIO A - - -  estado 2");
                 Console.Write("---------------->Factura: " + Convert.ToString(Fila.Cells[0].Value));
                 x.historial(3, Convert.ToString(Fila.Cells[0].Value));
             }
             salir();
         }
         else
         {
             MessageBox.Show("Producto faltante");
         }
     }
     catch (Exception fe)
     {
         creardetalle();
     }
 }