示例#1
0
        //# Carros con 6-3
        private void Carros_63(bool InsertaRegistro)
        {
            z_carros carros = new z_carros();

            if (carros.GPS_Expedientes().Tables[0].Rows.Count > 0)
            {
                foreach (DataRow row_exp in carros.GPS_Expedientes().Tables[0].Rows)
                {
                    decimal CoordenadaX = Convert.ToDecimal(row_exp["puntoX"].ToString());
                    decimal CoordenadaY = Convert.ToDecimal(row_exp["puntoY"].ToString());

                    if (carros.GPS_63(Convert.ToInt32(CoordenadaX).ToString(), Convert.ToInt32(CoordenadaY).ToString()).Tables[0].Rows.Count > 0)
                    {
                        foreach (DataRow row_63 in carros.GPS_63(Convert.ToInt32(CoordenadaX).ToString(), Convert.ToInt32(CoordenadaY).ToString()).Tables[0].Rows)
                        {
                            if (InsertaRegistro)
                            {
                                gvGps.Rows.Add(row_63["id_carro"].ToString(), row_63["nombre"], "(6-3) -> " + row_exp["clave"].ToString() + "", "6-10", "6-14", "6-15");
                            }
                            carros.GPS_Update_True(row_63["id_carro"].ToString());
                        }
                    }
                    //MessageBox.Show("Llamado  [" + row_exp["clave"].ToString() + "]  " + "CoordX [" + row_exp["puntoX"].ToString() + "]", "GEObit");
                }
            }
        }
示例#2
0
        protected void CargarGrilla()
        {
            gvGps.Rows.Clear();
            z_carros carros = new z_carros();



            //# Asigna z_carros.gps = false a todos los Carros
            carros.GPS_Update_False();

            //# Carros con 6-10
            if (carros.GPS_610().Tables[0].Rows.Count > 0)
            {
                foreach (DataRow row_610 in carros.GPS_610().Tables[0].Rows)
                {
                    gvGps.Rows.Add(row_610["id_carro"].ToString(), row_610["nombre"], "(6-10) -> " + row_610["id_compania"] + "", "6-10", "6-14", "6-15");
                    carros.GPS_Update_True(row_610["id_carro"].ToString());
                }
            }

            //# Carros con 6-14
            if (carros.GPS_614().Tables[0].Rows.Count > 0)
            {
                foreach (DataRow row_614 in carros.GPS_614().Tables[0].Rows)
                {
                    gvGps.Rows.Add(row_614["id_carro"].ToString(), row_614["nombre"], "(6-14) -> " + row_614["id"] + "", "6-10", "6-14", "6-15");
                    carros.GPS_Update_True(row_614["id_carro"].ToString());
                }
            }

            //# Carros con 6-15
            if (carros.GPS_615().Tables[0].Rows.Count > 0)
            {
                foreach (DataRow row_615 in carros.GPS_615().Tables[0].Rows)
                {
                    gvGps.Rows.Add(row_615["id_carro"].ToString(), row_615["nombre"], "(6-15) -> " + row_615["id"] + "", "6-10", "6-14", "6-15");
                    carros.GPS_Update_True(row_615["id_carro"].ToString());
                }
            }

            //# Carros En Acto (6-3)
            if (carros.GPS_Expedientes().Tables[0].Rows.Count > 0)
            {
                foreach (DataRow row_exp in carros.GPS_Expedientes().Tables[0].Rows)
                {
                    decimal CoordenadaX = Convert.ToDecimal(row_exp["puntoX"].ToString());
                    decimal CoordenadaY = Convert.ToDecimal(row_exp["puntoY"].ToString());

                    if (carros.GPS_63(Convert.ToInt32(CoordenadaX).ToString(), Convert.ToInt32(CoordenadaY).ToString()).Tables[0].Rows.Count > 0)
                    {
                        foreach (DataRow row_63 in carros.GPS_63(Convert.ToInt32(CoordenadaX).ToString(), Convert.ToInt32(CoordenadaY).ToString()).Tables[0].Rows)
                        {
                            gvGps.Rows.Add(row_63["id_carro"].ToString(), row_63["nombre"], "(6-3) -> " + row_exp["clave"].ToString() + "", "6-10", "6-14", "6-15");
                            carros.GPS_Update_True(row_63["id_carro"].ToString());
                        }
                    }
                    //MessageBox.Show("Llamado  [" + row_exp["clave"].ToString() + "]  " + "CoordX [" + row_exp["puntoX"].ToString() + "]", "GEObit");
                }
            }

            //# Carros con Localización Indeterminada
            if (carros.GPS_NoEncontrados().Tables[0].Rows.Count > 0)
            {
                foreach (DataRow row_NoEn in carros.GPS_NoEncontrados().Tables[0].Rows)
                {
                    gvGps.Rows.Add(row_NoEn["id_carro"].ToString(), row_NoEn["nombre"], "(6-13) ó ¿?", "6-10", "6-14", "6-15");
                }
            }
        }