public void ddl_destinoPlaya_SelectedIndexChanged(object sender, EventArgs e) { if (!(ddl_destinoPlaya.SelectedIndex == 0) || (ddl_destinoZona.SelectedIndex == 0)) { int id_playa = int.Parse(ddl_destinoPlaya.SelectedValue); LugarBC lugar = new LugarBC(); YMS_ZONA_BC yms = new YMS_ZONA_BC(); DataTable ds1 = yms.Obtenerlugares_playa(id_playa, null, "0"); utils.CargaDrop(ddl_destinoPos, "ID", "DESCRIPCION", ds1); if (ddl_destinoPos.Items.Count > 1) { ddl_destinoPos.Enabled = true; } else { ddl_destinoPos.Enabled = false; } } else { ddl_destinoPos.SelectedIndex = 0; ddl_destinoPos.Enabled = false; } ButtonClickDemo(null, null); }
protected void ddl_playa_SelectedIndexChanged(object sender, EventArgs e) { if ((this.ddl_playa.SelectedIndex != 0) && (this.ddl_zona.SelectedIndex != 0)) { int id_playa = Convert.ToInt32(this.ddl_playa.SelectedValue); YMS_ZONA_BC yms = new YMS_ZONA_BC(); DataTable ds1 = yms.Obtenerlugares_playa(id_playa, null, "0"); utils.CargaDrop(this.ddl_posicion, "ID", "DESCRIPCION", ds1); this.ddl_posicion.Enabled = true; } else { this.ddl_posicion.ClearSelection(); this.ddl_posicion.Enabled = false; } }
protected void ddl_zona_SelectedIndexChanged(object sender, EventArgs e) { if (this.ddl_zona.SelectedIndex != 0) { int id_zona = Convert.ToInt32(this.ddl_zona.SelectedValue); PlayaBC playa = new PlayaBC(); utils.CargaDrop(this.ddl_playa, "ID", "DESCRIPCION", playa.ObtenerPlayasXCriterio(null, null, id_zona, false, "200")); if (this.ddl_playa.Items.Count > 1) { this.ddl_playa.Enabled = true; if (this.ddl_playa.SelectedIndex != 0) { int id_playa = Convert.ToInt32(this.ddl_playa.SelectedValue); YMS_ZONA_BC yms = new YMS_ZONA_BC(); DataTable ds1 = yms.Obtenerlugares_playa(id_playa, null, "0"); utils.CargaDrop(this.ddl_posicion, "ID", "DESCRIPCION", ds1); if (this.ddl_posicion.Items.Count > 1) { this.ddl_posicion.Enabled = true; } else { this.ddl_posicion.Enabled = false; } } else { this.ddl_posicion.Enabled = false; } } else { this.ddl_playa.Enabled = false; this.ddl_posicion.Enabled = false; } } else { this.ddl_posicion.Enabled = false; this.ddl_playa.Enabled = false; this.ddl_posicion.SelectedIndex = 0; this.ddl_playa.SelectedIndex = 0; } }
protected void ddl_bloqPlaya_onChange(object sender, EventArgs e) { int playa_id = int.Parse(this.ddl_bloqPlaya.SelectedValue); YMS_ZONA_BC yms = new YMS_ZONA_BC(); DataTable ds1 = yms.Obtenerlugares_playa(playa_id, null, "0"); this.utils.CargaDrop(this.ddl_bloqLugar, "id", "codigo", ds1); if (this.ddl_bloqLugar.Items.Count <= 1) { this.ddl_bloqLugar.Enabled = false; } else { this.ddl_bloqLugar.Enabled = true; } }
protected void ddl_destinoPlaya2_SelectedIndexChanged(object sender, EventArgs e) { if (!(this.ddl_destinoPlaya2.SelectedIndex == 0) || (this.ddl_destinoZona2.SelectedIndex == 0)) { int id_playa = int.Parse(this.ddl_destinoPlaya2.SelectedValue); YMS_ZONA_BC yms = new YMS_ZONA_BC(); DataTable ds1 = yms.Obtenerlugares_playa(id_playa, null, "0"); utils.CargaDrop(this.ddl_destinoPos2, "ID", "DESCRIPCION", ds1); if (this.ddl_destinoPos2.Items.Count > 1) { this.ddl_destinoPos2.Enabled = true; } else { this.ddl_destinoPos2.Enabled = false; } } else { this.ddl_destinoPos2.ClearSelection(); this.ddl_destinoPos2.Enabled = false; } }
public void llenaPlaya(DataRow Playa) { double top; double left; double width; double height; int desfasey; int desfasex; desfasey = 0; desfasex = 0; top = double.Parse(Playa["Playa_Y"].ToString()); left = double.Parse(Playa["Playa_X"].ToString()); width = double.Parse(Playa["width"].ToString()); height = double.Parse(Playa["height"].ToString()); Panel zona1l = new Panel(); zona1l.ClientIDMode = ClientIDMode.Static; large.Controls.Add(zona1l); zona1l.Style["width"] = width.ToString().Replace(",", ".") + "%"; zona1l.Style["height"] = height.ToString().Replace(",", ".") + "%"; zona1l.ID = "play_" + Playa["id"].ToString(); zona1l.CssClass = "zona"; zona1l.CssClass = "zona"; zona1l.Style["top"] = (top + desfasey).ToString().Replace(",", ".") + "%"; zona1l.Style["left"] = (left + desfasex).ToString().Replace(",", ".") + "%"; // // zona1l.Style.Item("top") = 50.ToString + "%" // zona1l.Style.Item("left") = 50.ToString + "%" int lugares = Convert.ToInt32(Playa["lugares"].ToString()); YMS_ZONA_BC yms = new YMS_ZONA_BC(); DataTable ds = yms.Obtenerlugares_playa(Convert.ToInt32(Playa["id"].ToString()), null /* TODO Change to default(_) if this is not a reference type */, null /* TODO Change to default(_) if this is not a reference type */); for (int value = 0; value <= lugares - 1; value++) { Control anterior = zona1l.FindControl("lug_" + ds.Rows[value]["id"].ToString()); if (anterior != null) { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "alerta" + ds.Rows[value]["CODIGO"].ToString(), "console.log('" + ds.Rows[value]["CODIGO"] + " repetido: " + ds.Rows[value]["trai_placa"].ToString() + ", " + ((Image)(anterior)).Attributes["patente"] + " ' );", true); ((Image)anterior).Attributes.Add("repetido", "si"); anterior = null; } else { Panel celda2 = new Panel(); celda2.ClientIDMode = ClientIDMode.Static; Image imagen2 = new Image(); imagen2.ClientIDMode = ClientIDMode.Static; imagen2.ID = "lug_" + ds.Rows[value]["id"].ToString(); // celda2.Style.Add("display", "inline-grid") // celda2.CssClass = "icono1" // celda2.Width = ds.Rows(value)("ancho").ToString() // celda2.Height = ds.Rows(value)("alto").ToString() Label texto_trailer = new Label(); texto_trailer.CssClass = "patente_" + ds.Rows[value]["rotacion"].ToString(); texto_trailer.Text = ds.Rows[value]["trai_id"].ToString(); // celda2.Controls.Add(texto_trailer) Image pallet = new Image(); Image ottawa = new Image(); // Dim tabla As New Table // tabla.Style.Add("border", "1px solid white") // tabla.CssClass = "tabla_lugar" imagen2.Attributes.Add("rotacion", ds.Rows[value]["rotacion"].ToString()); int estado_sol = int.Parse(ds.Rows[value]["SOES_ID"].ToString()); if (ds.Rows[value]["trai_id"].ToString() == "0") { imagen2.Attributes.Add("patente", "vacio"); imagen2.ImageUrl = "../images/yms_estacionamiento_" + ds.Rows[value]["rotacion"].ToString() + ".png"; imagen2.Width = Unit.Percentage(double.Parse(ds.Rows[value]["ancho"].ToString())); // ;(ds.Rows(value)("ancho") - 2).ToString() + "%" imagen2.Height = Unit.Percentage(double.Parse(ds.Rows[value]["alto"].ToString())); // ; (ds.Rows(value)("alto") - 2).ToString() + "%" imagen2.CssClass = "context-menu-two icono masterTooltip lugar"; imagen2.Attributes.Add("title1", "Estacionamiento Vacío"); texto_trailer.Text = ""; // ds.Rows(value)("trai_id").ToString() } else { imagen2.Attributes.Add("patente", ds.Rows[value]["trai_placa"].ToString()); if (!System.IO.File.Exists(Server.MapPath(@"~/images") + "yms_trailer_" + ds.Rows[value]["rotacion"].ToString() + '_' + ds.Rows[value]["TRTI_COLOR"].ToString())) { imagen2.ImageUrl = "../images/yms_trailer_" + ds.Rows[value]["rotacion"].ToString() + '_' + "gray"; } else { imagen2.ImageUrl = "../images/yms_trailer_" + ds.Rows[value]["rotacion"].ToString() + '_' + ds.Rows[value]["TRTI_COLOR"].ToString(); } // imagen2.ImageUrl = "../images/yms_trailer_" + "1"+ '_' + "red"; imagen2.Width = Unit.Percentage(double.Parse(ds.Rows[value]["ancho"].ToString())); // (ds.Rows(value)("ancho") - 2).ToString() + "%" imagen2.Height = Unit.Percentage(double.Parse(ds.Rows[value]["alto"].ToString())); // ; (ds.Rows(value)("alto") - 2).ToString() + "%" imagen2.CssClass = "context-menu-one icono masterTooltip lugar"; imagen2.Attributes.Add("title1", "Doc Entrada:" + ds.Rows[value]["TRUE_DOC_INGRESO"].ToString()); texto_trailer.Text = ds.Rows[value]["trai_id"].ToString(); if (estado_sol >= 0 && estado_sol < 20) { // imagen2.ImageUrl += "_"+"empty"; imagen2.Attributes.Add("estado_carga", "../images/empty_" + ds.Rows[value]["rotacion"].ToString() + ".png"); } else if (estado_sol >= 20 && estado_sol < 30) { // imagen2.ImageUrl += "_" + "medium"; imagen2.Attributes.Add("estado_carga", "../images/medium_" + ds.Rows[value]["rotacion"].ToString() + ".png"); } else if (estado_sol == 30) { // imagen2.ImageUrl += "_" + "full"; imagen2.Attributes.Add("estado_carga", "../images/full_" + ds.Rows[value]["rotacion"].ToString() + ".png"); } if (estado_sol != 0) //Si tiene carga en proceso o está cargado, a la espera de finalizar solicitud { if (ds.Rows[value]["TRUE_CARGADO"].ToString() == "False") //Si está en carga { if (int.Parse(ds.Rows[value]["SOAN_MINS_CARGA_REAL"].ToString()) <= 120 && int.Parse(ds.Rows[value]["SOAN_MINS_CARGA_REAL"].ToString()) >= 0) { // imagen2.ImageUrl +="_"+"ok"; imagen2.Attributes.Add("estado_reloj", "../images/ok_" + ds.Rows[value]["rotacion"].ToString() + ".png"); } else if (int.Parse(ds.Rows[value]["SOAN_MINS_CARGA_REAL"].ToString()) <= 180 && int.Parse(ds.Rows[value]["SOAN_MINS_CARGA_REAL"].ToString()) >= 121) { // imagen2.ImageUrl += "_" + "enhora"; imagen2.Attributes.Add("estado_reloj", "../images/enhora_" + ds.Rows[value]["rotacion"].ToString() + ".png"); } else if (int.Parse(ds.Rows[value]["SOAN_MINS_CARGA_REAL"].ToString()) >= 181) { // imagen2.ImageUrl += "_" + "atrasado"; imagen2.Attributes.Add("estado_reloj", "../images/atrasado_" + ds.Rows[value]["rotacion"].ToString() + ".png"); } } else { if (int.Parse(ds.Rows[value]["MOVI_MINS_ASIGNA_EJECUTA"].ToString()) <= 15 && int.Parse(ds.Rows[value]["MOVI_MINS_ASIGNA_EJECUTA"].ToString()) >= 0) { imagen2.Attributes.Add("estado_reloj", "../images/ok_" + ds.Rows[value]["rotacion"].ToString() + ".png"); // imagen2.ImageUrl += "_" + "ok"; } else if (int.Parse(ds.Rows[value]["MOVI_MINS_ASIGNA_EJECUTA"].ToString()) <= 30 && int.Parse(ds.Rows[value]["MOVI_MINS_ASIGNA_EJECUTA"].ToString()) >= 16) { // imagen2.ImageUrl += "_" + "enhora"; imagen2.Attributes.Add("estado_reloj", "../images/enhora_" + ds.Rows[value]["rotacion"].ToString() + ".png"); } else if (int.Parse(ds.Rows[value]["MOVI_MINS_ASIGNA_EJECUTA"].ToString()) >= 31) { // imagen2.ImageUrl += "_" + "atrasado"; imagen2.Attributes.Add("estado_reloj", "../images/atrasado_" + ds.Rows[value]["rotacion"].ToString() + ".png"); } } } imagen2.ImageUrl += ".png"; } imagen2.Attributes.Add("playa", ds.Rows[value]["PLAY_COD"].ToString()); imagen2.Attributes.Add("posicion", ds.Rows[value]["orden"].ToString()); imagen2.Attributes.Add("codigo_lugar", ds.Rows[value]["CODIGO"].ToString()); imagen2.Attributes.Add("trai_id", ds.Rows[value]["TRAI_ID"].ToString()); if (ds.Rows[value]["MOVI_ORIGEN"].ToString() != "0") { imagen2.Attributes.Add("movimiento", ds.Rows[value]["MOVI_ORIGEN"].ToString()); } else if (ds.Rows[value]["MOVI_DEST"].ToString() != "0") { imagen2.Attributes.Add("movimiento", ds.Rows[value]["MOVI_DEST"].ToString()); } else { imagen2.Attributes.Add("movimiento", ""); } // prueba tabla if ((ds.Rows[value]["rotacion"].ToString() == "2") | (ds.Rows[value]["rotacion"].ToString() == "4")) { imagen2.Style["top"] = Unit.Percentage(double.Parse(ds.Rows[value]["LUGAR_y"].ToString())).ToString().Replace(",", "."); // topimagen.ToString() + "%" imagen2.Style["left"] = Unit.Percentage(double.Parse(ds.Rows[value]["LUGAR_X"].ToString())).ToString().Replace(",", "."); // (leftimagen).ToString() + "%" } else if ((ds.Rows[value]["rotacion"].ToString() == "1") | (ds.Rows[value]["rotacion"].ToString() == "3")) { imagen2.Style["top"] = Unit.Percentage(double.Parse(ds.Rows[value]["LUGAR_y"].ToString())).ToString().Replace(",", "."); // topimagen.ToString() + "%" imagen2.Style["left"] = Unit.Percentage(double.Parse(ds.Rows[value]["LUGAR_X"].ToString())).ToString().Replace(",", "."); // (leftimagen).ToString() + "%" } // celda2.Controls.Add(tabla) celda2.Controls.Add(imagen2); if ((1 == 1)) { pallet.ImageUrl = "../images/yms_pallet_vacio.png"; pallet.Width = 3; // (ds.Rows(value)("ancho") - 2).ToString() pallet.Height = 3; // (ds.Rows(value)("alto") - 2).ToString() } if ((ds.Rows[value]["ottawa"].ToString() != "0")) { ottawa.ImageUrl = "../images/ottawa_" + ds.Rows[value]["rotacion"].ToString() + ".png"; celda2.Controls.Add(ottawa); } zona1l.Controls.Add(celda2); if (imagen2.ID == "lug_2776") { imagen2.Attributes["prueba"] = "pueba"; } } } }
public void llenaPlaya(DataRow playa) { double top; double left; double width; double height; int desfasey; int desfasex; desfasey = 0; desfasex = 0; top = double.Parse(playa["Playa_Y"].ToString()); left = double.Parse(playa["Playa_X"].ToString()); width = double.Parse(playa["width"].ToString()); height = double.Parse(playa["height"].ToString()); Panel zona1l = new Panel(); large.Controls.Add(zona1l); zona1l.ClientIDMode = ClientIDMode.Static; zona1l.Style["width"] = width.ToString().Replace(",", ".") + "%"; zona1l.Style["height"] = height.ToString().Replace(",", ".") + "%"; zona1l.ID = "play_" + playa["id"].ToString(); // zona1l.Attributes.Add("SUPL_ID", playa["supl_id"].ToString()); zona1l.Attributes.Add("rotacion", playa["rotacion"].ToString()); zona1l.CssClass = "zona"; zona1l.Style["top"] = (top + desfasey).ToString().Replace(",", ".") + "%"; zona1l.Style["left"] = (left + desfasex).ToString().Replace(",", ".") + "%"; // // zona1l.Style.Item("top") = 50.ToString + "%" // zona1l.Style.Item("left") = 50.ToString + "%" int lugares = Convert.ToInt32(playa["lugares"].ToString()); YMS_ZONA_BC yms = new YMS_ZONA_BC(); DataTable ds = yms.Obtenerlugares_playa(Convert.ToInt32(playa["id"].ToString()), null /* TODO Change to default(_) if this is not a reference type */, null /* TODO Change to default(_) if this is not a reference type */); zona1l.Attributes.Add("playa", playa["CODIGO"].ToString()); zona1l.Attributes.Add("lugares", lugares.ToString()); for (int value = 0; value <= lugares - 1; value++) { Control anterior = zona1l.FindControl("lug_" + ds.Rows[value]["id"].ToString()); if (anterior != null) { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "alerta" + ds.Rows[value]["CODIGO"].ToString(), "console.log('" + ds.Rows[value]["CODIGO"] + " repetido: " + ds.Rows[value]["trai_placa"].ToString() + ", " + ((Image)(anterior)).Attributes["patente"] + " ' );", true); ((Image)anterior).Attributes.Add("repetido", "si"); anterior = null; } else { Panel celda2 = new Panel(); celda2.ClientIDMode = ClientIDMode.Static; Image imagen2 = new Image(); imagen2.ID = "lug_" + ds.Rows[value]["id"].ToString(); imagen2.ClientIDMode = ClientIDMode.Static; // celda2.Style.Add("display", "inline-grid") // celda2.CssClass = "icono1" // celda2.Width = ds.Rows(value)("ancho").ToString() // celda2.Height = ds.Rows(value)("alto").ToString() Label texto_trailer = new Label(); texto_trailer.CssClass = "patente_" + ds.Rows[value]["rotacion"].ToString(); texto_trailer.Text = ds.Rows[value]["trai_id"].ToString(); // celda2.Controls.Add(texto_trailer) Image pallet = new Image(); Image ottawa = new Image(); // Dim tabla As New Table // tabla.Style.Add("border", "1px solid white") // tabla.CssClass = "tabla_lugar" imagen2.Attributes.Add("rotacion", ds.Rows[value]["rotacion"].ToString()); if (ds.Rows[value]["trai_id"].ToString() == "0") { imagen2.Attributes.Add("patente", "vacio"); imagen2.ImageUrl = "../images/yms_estacionamiento_" + ds.Rows[value]["rotacion"].ToString() + ".png"; imagen2.Width = Unit.Percentage(double.Parse(ds.Rows[value]["ancho"].ToString())); // ;(ds.Rows(value)("ancho") - 2).ToString() + "%" imagen2.Height = Unit.Percentage(double.Parse(ds.Rows[value]["alto"].ToString())); // ; (ds.Rows(value)("alto") - 2).ToString() + "%" imagen2.CssClass = "context-menu-one icono masterTooltip lugar"; imagen2.Attributes.Add("title1", "Estacionamiento Vacío"); texto_trailer.Text = ""; // ds.Rows(value)("trai_id").ToString() } else { imagen2.Attributes.Add("patente", ds.Rows[value]["trai_id"].ToString()); imagen2.ImageUrl = "../images/yms_trailer_" + ds.Rows[value]["rotacion"].ToString() + ".png"; imagen2.Width = Unit.Percentage(double.Parse(ds.Rows[value]["ancho"].ToString())); // (ds.Rows(value)("ancho") - 2).ToString() + "%" imagen2.Height = Unit.Percentage(double.Parse(ds.Rows[value]["alto"].ToString())); // ; (ds.Rows(value)("alto") - 2).ToString() + "%" imagen2.CssClass = "context-menu-one icono masterTooltip lugar"; imagen2.Attributes.Add("title1", "Doc Entrada:" + ds.Rows[value]["TRUE_DOC_INGRESO"].ToString()); texto_trailer.Text = ds.Rows[value]["trai_id"].ToString(); } imagen2.Attributes.Add("playa", ds.Rows[value]["PLAY_COD"].ToString()); imagen2.Attributes.Add("posicion", ds.Rows[value]["orden"].ToString()); imagen2.Attributes.Add("codigo_lugar", ds.Rows[value]["CODIGO"].ToString()); imagen2.Attributes.Add("trai_id", ds.Rows[value]["TRAI_ID"].ToString()); // prueba tabla if ((ds.Rows[value]["rotacion"].ToString() == "2") | (ds.Rows[value]["rotacion"].ToString() == "4")) { // Dim fila As New TableRow // Dim superior As New TableCell // Dim celdaimages As New TableCell // Dim inferios As New TableCell // fila.Cells.Add(superior) // superior.Controls.Add(ottawa) // fila.Cells.Add(celdaimages) // celdaimages.Controls.Add(texto_trailer) // celdaimages.Controls.Add(imagen2) // fila.Cells.Add(inferios) // inferios.Controls.Add(pallet) // tabla.Rows.Add(fila) // celda2.CssClass = celda2.CssClass + " icono1_2" // Dim topimagen As Double = ds.Rows(value)("LUGAR_y") '* value // Dim leftimagen As Double = ds.Rows(value)("LUGAR_X") '* value imagen2.Style["top"] = Unit.Percentage(double.Parse(ds.Rows[value]["LUGAR_y"].ToString())).ToString().Replace(",", "."); // topimagen.ToString() + "%" imagen2.Style["left"] = Unit.Percentage(double.Parse(ds.Rows[value]["LUGAR_X"].ToString())).ToString().Replace(",", "."); // (leftimagen).ToString() + "%" } else if ((ds.Rows[value]["rotacion"].ToString() == "1") | (ds.Rows[value]["rotacion"].ToString() == "3")) { // Dim fila1 As New TableRow // Dim superior As New TableCell // Dim fila2 As New TableRow // Dim celdaimages As New TableCell // Dim fila3 As New TableRow // Dim inferios As New TableCell // fila1.Cells.Add(superior) // fila2.Cells.Add(celdaimages) // fila3.Cells.Add(inferios) // tabla.Rows.Add(fila1) // tabla.Rows.Add(fila2) // tabla.Rows.Add(fila3) // celdaimages.Controls.Add(texto_trailer) // superior.Controls.Add(ottawa) // celdaimages.Controls.Add(imagen2) // inferios.Controls.Add(pallet) // Dim topimagen As Double = ds.Rows(value)("LUGAR_y") ' * value // Dim leftimagen As Double = ds.Rows(value)("LUGAR_X") ' * value imagen2.Style["top"] = Unit.Percentage(double.Parse(ds.Rows[value]["LUGAR_y"].ToString())).ToString().Replace(",", "."); // topimagen.ToString() + "%" imagen2.Style["left"] = Unit.Percentage(double.Parse(ds.Rows[value]["LUGAR_X"].ToString())).ToString().Replace(",", "."); // (leftimagen).ToString() + "%" } // celda2.Controls.Add(tabla) celda2.Controls.Add(imagen2); if ((1 == 1)) { pallet.ImageUrl = "../images/yms_pallet_vacio.png"; pallet.Width = 3; // (ds.Rows(value)("ancho") - 2).ToString() pallet.Height = 3; // (ds.Rows(value)("alto") - 2).ToString() } if ((ds.Rows[value]["ottawa"].ToString() != "0")) { ottawa.ImageUrl = "../images/ottawa_" + ds.Rows[value]["rotacion"].ToString() + ".png"; celda2.Controls.Add(ottawa); } zona1l.Controls.Add(celda2); } } }