protected void btn_finalizarExterno_Click(object sender, EventArgs e) { SolicitudBC solicitud = new SolicitudBC(); solicitud.SOLI_ID = int.Parse(this.hf_idSolicitud.Value); string resultado = ""; if (solicitud.DescargaCompleta(solicitud.SOLI_ID, out resultado, int.Parse(this.ddl_editPos.SelectedValue))) { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "asdf", "showAlert('Descarga completada');", true); this.ObtenerSolicitudes(true); } else { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "asdf", string.Format("alert('{0}');", resultado), true); } }
protected void btn_finalizarExterno_Click(object sender, EventArgs e) { SolicitudBC solicitud = new SolicitudBC(); solicitud.SOLI_ID = int.Parse(hf_idSolicitud.Value); string resultado = ""; if (solicitud.DescargaCompleta(solicitud.SOLI_ID, out resultado, int.Parse(ddl_editPos.SelectedValue))) { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "asdf", "showAlert('Descarga completada');", true); ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "asdf1", "$('#modalPosicion').modal('hide');", true); ObtenerSolicitudes(true); } else { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "asdf", "alert('" + resultado + "');", true); } }
protected void cargaFin_Click(object sender, EventArgs e) { SolicitudBC solicitud = new SolicitudBC(); solicitud.SOLI_ID = int.Parse(this.hf_idSolicitud.Value); string resultado = ""; UsuarioBC usuario = new UsuarioBC(); usuario = (UsuarioBC)this.Session["Usuario"]; solicitud.DescargaCompleta(solicitud.SOLI_ID, out resultado, usuario.ID); if (resultado == "") { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "asdf", "showAlert('Descarga completada');", true); this.ObtenerSolicitudes(true); } else { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "asdf", string.Format("alert('{0}');", resultado), true); } }
protected void cargaFin_Click(object sender, EventArgs e) { SolicitudBC solicitud = new SolicitudBC(); solicitud.SOLI_ID = int.Parse(hf_idSolicitud.Value); string resultado = ""; UsuarioBC usuario = new UsuarioBC(); usuario = (UsuarioBC)Session["Usuario"]; solicitud.DescargaCompleta(solicitud.SOLI_ID, out resultado, usuario.ID); if (resultado == "") { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "asdf", "showAlert('Descarga completada');", true); ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "asdf1", "$('#modalConfirmacion').modal('hide');", true); ObtenerSolicitudes(true); } else { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "asdf", "alert('" + resultado + "');", true); } }
protected void gv_listar_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "DEF_DESCARGA_LI" || e.CommandName == "DEF_PALLETS" || e.CommandName == "DEF_MOVER" || e.CommandName == "DEF_DESECHOS" || e.CommandName == "DESCARGA_EDITA" || e.CommandName == "DESCARGA_BLOQUEAR" || e.CommandName == "DESCARGA_COMPLETA_LI" || e.CommandName == "DESCARGA_POSICION_LI" || e.CommandName == "DESECHOS_COMPLETAR" || e.CommandName == "PALLETS_COMPLETAR" || e.CommandName == "PALLETS_TRASLADO_ANDEN" || e.CommandName == "PALLETS_TRASLADO_EST" || e.CommandName == "PALLETS_REINICIAR" || e.CommandName == "DEF_DESCARGA" || e.CommandName == "DESCARGA_COMPLETA" || e.CommandName == "DESCARGA_POSICION" || e.CommandName == "DESCARGA_MOVER") { int index = Convert.ToInt32(e.CommandArgument); hf_idTrailer.Value = gv_listar.DataKeys[index].Values[0].ToString(); hf_idSolicitud.Value = gv_listar.DataKeys[index].Values[1].ToString(); hf_lugaid.Value = gv_listar.DataKeys[index].Values[2].ToString(); hf_soanorden.Value = gv_listar.DataKeys[index].Values[3].ToString(); hf_timestamp.Value = gv_listar.DataKeys[index].Values[4].ToString(); Limpiar(); hf_accion.Value = e.CommandName; TituloModal(e.CommandName); hf_soli_tipo.Value = "0"; rb_descargar.Checked = false; rb_Desechos.Checked = false; rb_estacionamiento.Checked = false; rb_estacionamientoMan.Checked = false; rb_Pallets.Checked = false; rb_Nada.Checked = false; switch (hf_accion.Value) { case "DEF_PALLETS": rb_Pallets.Checked = true; hf_soli_tipo.Value = "3"; Modal(false, true, true); int luga_trailer = Convert.ToInt32(hf_lugaid.Value); LugarBC luga = new LugarBC(); luga = luga.obtenerXID(luga_trailer); try { ddl_zona.SelectedValue = luga.ID_ZONA.ToString(); ddl_zona_SelectedIndexChanged(null, null); ddl_playa.SelectedValue = luga.ID_PLAYA.ToString(); ddl_playa_SelectedIndexChanged(null, null); ddl_posicion.SelectedValue = luga.ID.ToString(); } catch (Exception) { ddl_zona_SelectedIndexChanged(null, null); } break; case "DEF_DESECHOS": rb_Desechos.Checked = true; hf_soli_tipo.Value = "4"; Modal(false, true, true); luga_trailer = Convert.ToInt32(hf_lugaid.Value); luga = new LugarBC(); luga = luga.obtenerXID(luga_trailer); try { ddl_zona.SelectedValue = luga.ID_ZONA.ToString(); ddl_zona_SelectedIndexChanged(null, null); ddl_playa.SelectedValue = luga.ID_PLAYA.ToString(); ddl_playa_SelectedIndexChanged(null, null); ddl_posicion.SelectedValue = luga.ID.ToString(); } catch (Exception) { ddl_zona_SelectedIndexChanged(null, null); } break; case "DESCARGA_COMPLETA_LI": case "PALLETS_COMPLETAR": Modal(true, false, false); break; case "DESECHOS_COMPLETAR": Modal(true, false, false); break; case "DEF_MOVER": Modal(false, true, true); break; case "DEF_DESCARGA_LI": hf_soli_tipo.Value = "5"; Modal(false, true, false); break; case "DESCARGA_POSICION_LI": case "DESECHOS_TRASLADO_ANDEN": case "DESECHOS_TRASLADO_EST": case "DESECHOS_REINICIAR": case "PALLETS_TRASLADO_ANDEN": case "PALLETS_TRASLADO_EST": case "PALLETS_REINICIAR": case "DEF_DESCARGA": case "DESCARGA_POSICION": case "DESCARGA_MOVER": Modal(false, true, false); break; case "DESCARGA_COMPLETA": // bool ext = Convert.ToBoolean(gv_listar.DataKeys[index].Values[5]); //if (ext) //{ // Modal(false, true, false); //} //else //{ string mensaje; SolicitudBC s = new SolicitudBC(); bool error = s.DescargaCompleta(Convert.ToInt32(hf_idSolicitud.Value), out mensaje, usuario.ID); if (error) { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "msj", "showAlert('Se ha completado la descarga');", true); } else { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "msj", string.Format("showAlert4('{0}');", mensaje), true); } ObtenerTrailer(true); // } break; case "DESCARGA_BLOQUEAR": SolicitudAndenesBC sa = new SolicitudAndenesBC(); sa.SOLI_ID = Convert.ToInt32(hf_idSolicitud.Value); LugarBC l = new LugarBC(); int play_id = sa.ObtenerPlayaId(); drop.Lugar1(ddl_bloquearPos, Convert.ToInt32(dropsite.SelectedValue), play_id, 0, 1); // l.ObtenerXPlaya(play_id)); gv_bloqueo.DataSource = sa.ObtenerBloqueados(); gv_bloqueo.DataBind(); ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "asdf", "modalBloqueoAnden();", true); break; } } }