private void cargarGrillaCC() { try { gv_DatosCocheras.DataSource = BIZReserva.SelectByPropietario(User.Identity.GetUserId()); gv_DatosCocheras.DataBind(); if (gv_DatosCocheras.Rows.Count > 0) { //Attribute to show the Plus Minus Button. gv_DatosCocheras.HeaderRow.Cells[0].Attributes["data-class"] = "expand"; //Attribute to hide column in Phone. gv_DatosCocheras.HeaderRow.Cells[1].Attributes["data-hide"] = "phone"; //Adds THEAD and TBODY to GridView. gv_DatosCocheras.HeaderRow.TableSection = TableRowSection.TableHeader; pnlTabcc.Visible = true; } else { //pnlTabcc.Visible = false; btnVerMovCC.Visible = false; } } catch (Exception) { Response.Redirect("ErrorDB.aspx"); } }
protected void gvPlaza_RowEditing(object sender, GridViewEditEventArgs e) { lblMensajeError.Text = string.Empty; DataSet dsPagosPendientes = BIZReserva.MisReservasSelectByPagoStateAndUserId(false, User.Identity.GetUserId()); if (dsPagosPendientes.Tables.Count > 0 && dsPagosPendientes.Tables[0].Rows.Count > 0) { lblMensajeError.Text = "No puede generar la reserva: Tiene reserva pendiente de pago."; //((SiteMaster)this.Master).ShowMessage("<strong>No puede generar la reserva: Tiene reserva pendiente de pago.</strong>", SiteMaster.WarningType.Warning); } else { pnlTab1.Visible = false; pnlTab2.Visible = true; txtIdPlaza.Text = gvPlaza.Rows[e.NewEditIndex].Cells[0].Text.ToString(); //txtdescEstacionamiento.Text = gvPlaza.Rows[e.NewEditIndex].Cells[1].Text.ToString(); txtdescEstacionamiento.Text = ((Label)gvPlaza.Rows[e.NewEditIndex].FindControl("lblTarifa")).Text.Substring(1); ddlTipoAlquiler.SelectedValue = gvPlaza.Rows[e.NewEditIndex].Cells[1].Text.ToString().Equals("Diario") ? "1" : "2";//((Label)gvPlaza.Rows[e.NewEditIndex].FindControl("lblTipoEstadiaId")).Text.Substring(1); txtCalle.Text = gvPlaza.Rows[e.NewEditIndex].Cells[3].Text.ToString(); txtAltura.Text = gvPlaza.Rows[e.NewEditIndex].Cells[4].Text.ToString(); txtdatosAdicionales.Text = gvPlaza.Rows[e.NewEditIndex].Cells[5].Text.ToString(); txtdescBarrio.Text = gvPlaza.Rows[e.NewEditIndex].Cells[6].Text.ToString(); /*if (Request.Browser.Browser == "Chrome") * { * txtFecha.Text = DateTime.Today.ToString("yyyy-MM-dd"); * txtFechaDesde.Text = DateTime.Today.ToString("yyyy-MM-dd"); * txtFechaHasta.Text = DateTime.Today.ToString("yyyy-MM-dd"); * * } * else * { * txtFecha.Text = DateTime.Today.ToString("dd/MM/yyyy"); * txtFechaDesde.Text = DateTime.Today.ToString("dd/MM/yyyy"); * txtFechaHasta.Text = DateTime.Today.ToString("dd/MM/yyyy"); * * }*/ if (ddlTipoAlquiler.SelectedValue == "1") { divDiario.Visible = true; divHora.Visible = false; } else { divDiario.Visible = false; divHora.Visible = true; } ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "pepe", "mostrar();", true); } e.Cancel = true; }
protected void btnVerMovCC_Click(object sender, EventArgs e) { BIZReserva.ReservaUpdateCerrado(Context.User.Identity.GetUserId()); DataSet dsCuentaCorriente = BIZCuentaCorriente.Select(Context.User.Identity.GetUserId()); int nroCuenta = Convert.ToInt32(dsCuentaCorriente.Tables[0].Rows[0]["nroCuenta"]); BIZCuentaCorriente.UpdateSaldo(nroCuenta, SaldoTotal * (-1)); BIZOperacionesCtaCte.Insert(nroCuenta, SaldoTotal, Utils.GetDateTimeLocal(), "Acreditación en Cuenta Corriente", "CRÉDITO"); BIZBitacora.Insert(Utils.GetDateTimeLocal(), Context.User.Identity.GetUserId(), "MODIFICACIÓN", "Acreditación en Cuenta Corriente"); cargarGrillaCC(); }
protected void btnFiltrar2_Click(object sender, EventArgs e) { Total = 0; lblErrorFiltro2.Text = string.Empty; DateTime fechaDesde; DateTime fechaHasta; if (ValidacionFechas2(out fechaDesde, out fechaHasta)) { DateTime?fechaDesdeFiltro = fechaDesde != DateTime.MinValue ? fechaDesde : (DateTime?)null; DateTime?fechaHastaFiltro = fechaHasta != DateTime.MinValue ? fechaHasta : (DateTime?)null; gvReserva.DataSource = BIZReserva.MisReservasSelectAllByEstadoPago(true, fechaDesdeFiltro, fechaHastaFiltro, ddlMail2.SelectedValue); gvReserva.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (HttpContext.Current.User.Identity.IsAuthenticated == true) { try { if (!this.IsPostBack) { BIZReserva.ReservaUpdateFinalizado(DateTime.Today, DateTime.Today.Hour.ToString().PadLeft(2, '0')); ddlZona.DataSource = BIZZona.SelectAll(); ddlZona.DataBind(); string query = @"SELECT E.[descripcion], E.[calle], E.[altura], E.[datosAdicionales], B.[descripcion], E.[latitud] ,E.[longitud], TE.[idTipoEstadia] FROM [Estacionamiento] E, [Plaza] P, [Barrio] B, [TipoEstadia] TE, [Tarifa] T where E.[idEstacionamiento] = P.[idEstacionamiento] AND B.[idBarrio] = E.[idBarrio] AND P.[disponible] = 1 AND P.[pago] = 0 and P.idTarifa = T.idTarifa and T.idTipoEstadia = TE.idTipoEstadia"; DataTable dt = this.GetData(query); int? idTipoEstadia = !string.IsNullOrEmpty(ddlTipoAlquiler.SelectedValue) ? int.Parse(ddlTipoAlquiler.SelectedValue) : (int?)null; int? idZona = int.Parse(ddlZona.SelectedValue); DateTime?fechaDesde = !string.IsNullOrEmpty(txtFechaDesde.Text) ? Convert.ToDateTime(txtFechaDesde.Text) : (DateTime?)null; DateTime?fechaHasta = !string.IsNullOrEmpty(txtFechaHasta.Text) ? Convert.ToDateTime(txtFechaHasta.Text) : (DateTime?)null; dt = BIZPlaza.SelectAll(idTipoEstadia, idZona, fechaDesde, fechaHasta).Tables[0]; Session["PlazasFiltradas"] = dt; rptMarkers.DataSource = dt; rptMarkers.DataBind(); if (dt.Rows.Count == 0) { /*lblErrorMapa.Text = "No se encuentran plazas disponibles"; * lblErrorMapa.Visible = true;*/ ((SiteMaster)this.Master).ShowMessage("<strong>No se encuentran plazas disponibles</strong>", SiteMaster.WarningType.Warning); } } } catch (Exception) { rptMarkers.DataSource = null; lblErrorMapa.Visible = true; } } else { Response.Redirect("~/Account/Login.aspx"); } }
protected void gvReservasPendientes_RowEditing(object sender, GridViewEditEventArgs e) { //pnlTab1.Visible = false; //pnlTab2.Visible = true; //txtIdReserva.Text = gvReservasPendientes.Rows[e.NewEditIndex].Cells[0].Text.ToString(); //txtdescEstacionamiento.Text = gvReservasPendientes.Rows[e.NewEditIndex].Cells[1].Text.ToString(); //txtCalle.Text = gvReservasPendientes.Rows[e.NewEditIndex].Cells[2].Text.ToString(); //txtAltura.Text = gvReservasPendientes.Rows[e.NewEditIndex].Cells[3].Text.ToString(); //txtdatosAdicionales.Text = gvReservasPendientes.Rows[e.NewEditIndex].Cells[4].Text.ToString(); //txtdescBarrio.Text = gvReservasPendientes.Rows[e.NewEditIndex].Cells[5].Text.ToString(); //txtUser.Text = gvReservasPendientes.Rows[e.NewEditIndex].Cells[6].Text.ToString(); //e.Cancel = true; //ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "pepe", "mostrar();", true); BIZReserva.MisReservasCancelar(int.Parse(gvReservasPendientes.Rows[e.NewEditIndex].Cells[0].Text.ToString())); cargarReservas(); }
private void cargarEstacionamientos() { ddlReserva.DataSource = BIZReserva.ReservaPagaSelectByIdUsuario(Context.User.Identity.GetUserId()); ddlReserva.DataValueField = "idReserva"; ddlReserva.DataTextField = "descripcion"; ddlReserva.DataBind(); ddlTipoReclamo.DataSource = BIZTipoReclamo.SelectAll(); ddlTipoReclamo.DataValueField = "idTipoReclamo"; ddlTipoReclamo.DataTextField = "descripcion"; ddlTipoReclamo.DataBind(); try { CultureInfo us = new CultureInfo("es-ES"); if (Context.User.IsInRole("Administrador")) { gvReclamo.DataSource = BIZReclamo.SelectAll(); } else { gvReclamo.DataSource = BIZReclamo.SelectByIdUser(Context.User.Identity.GetUserId()); gvReclamo.Columns[gvReclamo.Columns.Count - 1].Visible = false; gvReclamo.Columns[gvReclamo.Columns.Count - 2].Visible = false; } gvReclamo.DataBind(); if (gvReclamo.Rows.Count > 0) { //Attribute to show the Plus Minus Button. gvReclamo.HeaderRow.Cells[0].Attributes["data-class"] = "expand"; //Attribute to hide column in Phone. gvReclamo.HeaderRow.Cells[1].Attributes["data-hide"] = "phone"; //Adds THEAD and TBODY to GridView. gvReclamo.HeaderRow.TableSection = TableRowSection.TableHeader; } } catch (Exception) { Response.Redirect("ErrorPage.aspx"); } }
private void cargarReservas() { try { if (Context.User.IsInRole("Administrador")) { gvReserva.DataSource = BIZReserva.MisReservasSelectAllByEstadoPago(true, null, null, ""); gvReserva.DataBind(); gvReservasPendientes.DataSource = BIZReserva.MisReservasSelectAllByEstadoPago(false, null, null, ""); gvReservasPendientes.DataBind(); } else { divFiltros1.Visible = false; divFiltros2.Visible = false; gvReserva.DataSource = BIZReserva.MisReservasSelectByPagoStateAndUserId(true, User.Identity.GetUserId()); gvReserva.DataBind(); gvReservasPendientes.DataSource = BIZReserva.MisReservasSelectByPagoStateAndUserId(false, User.Identity.GetUserId()); gvReservasPendientes.DataBind(); } CultureInfo us = new CultureInfo("es-ES"); if (gvReserva.Rows.Count > 0) { //Attribute to show the Plus Minus Button. gvReserva.HeaderRow.Cells[0].Attributes["data-class"] = "expand"; //Attribute to hide column in Phone. gvReserva.HeaderRow.Cells[1].Attributes["data-hide"] = "phone"; //Adds THEAD and TBODY to GridView. gvReserva.HeaderRow.TableSection = TableRowSection.TableHeader; } } catch (Exception ex) { string err = ex.Message; Response.Redirect("ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { gvReserva.DataSource = BIZReserva.MisReservasSelectByIdReserva(Convert.ToInt32(Request["pPurchaseOrderID"])); gvReserva.DataBind(); Response.ContentType = "application/pdf"; Response.AddHeader("content-disposition", "attachment;filename=Reserva.pdf"); Response.Cache.SetCacheability(HttpCacheability.NoCache); StringWriter sw = new StringWriter(); HtmlTextWriter hw = new HtmlTextWriter(sw); this.Page.RenderControl(hw); StringReader sr = new StringReader(sw.ToString()); Document pdfDoc = new Document(PageSize.A4, 15f, 15f, 2f, 5f); HTMLWorker htmlparser = new HTMLWorker(pdfDoc); PdfWriter.GetInstance(pdfDoc, Response.OutputStream); pdfDoc.Open(); htmlparser.Parse(sr); //pdfDoc.Close(); //Response.Write(pdfDoc); //Response.End(); pdfDoc.Close(); Response.Write(pdfDoc); //Response.End(); Response.Flush(); //response.End(); HttpContext.Current.ApplicationInstance.CompleteRequest(); } catch (Exception ex) { string err = ex.Message; Response.Redirect("ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { if (HttpContext.Current.User.Identity.IsAuthenticated == true) { BIZReserva.ReservaUpdateFinalizado(DateTime.Today, DateTime.Today.Hour.ToString().PadLeft(2, '0')); cargarReservas(); } else { Response.Redirect("~/Account/Login.aspx"); } if (!IsPostBack) { ddlMail.DataSource = BIZDatosPersonales.SelectAll(); ddlMail.DataBind(); ddlMail.Items.Insert(0, new ListItem(String.Empty, String.Empty)); ddlMail.SelectedIndex = 0; ddlMail2.DataSource = BIZDatosPersonales.SelectAll(); ddlMail2.DataBind(); ddlMail2.Items.Insert(0, new ListItem(String.Empty, String.Empty)); ddlMail2.SelectedIndex = 0; } }
protected void gvReclamo_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Rechazar") { int idReclamo = int.Parse(e.CommandArgument.ToString().Split(',')[0]); int idReserva = int.Parse(e.CommandArgument.ToString().Split(',')[1]); BIZReclamo.UpdateStatus(idReclamo, 3); BIZBitacora.Insert(Utils.GetDateTimeLocal(), Context.User.Identity.GetUserId(), "RECHAZO", "Reclamo"); if (Context.User.IsInRole("Administrador")) { gvReclamo.DataSource = BIZReclamo.SelectAll(); } else { gvReclamo.DataSource = BIZReclamo.SelectByIdUser(Context.User.Identity.GetUserId()); gvReclamo.Columns[gvReclamo.Columns.Count - 1].Visible = false; gvReclamo.Columns[gvReclamo.Columns.Count - 2].Visible = false; gvReclamo.Columns[2].Visible = false; } gvReclamo.DataBind(); } else if (e.CommandName == "Pagar") { int idReclamo = int.Parse(e.CommandArgument.ToString().Split(',')[0]); int idReserva = int.Parse(e.CommandArgument.ToString().Split(',')[1]); DataSet dsReserva = BIZReserva.MisReservasSelectByIdReserva(idReserva); DataSet dsCC = BIZCuentaCorriente.Select(User.Identity.GetUserId()); String nroCuenta = dsCC.Tables[0].Rows[0]["nroCuenta"].ToString(); String importe = dsReserva.Tables[0].Rows[0]["tarifa"].ToString(); BIZCuentaCorriente.UpdateSaldo(Convert.ToInt32(nroCuenta), Convert.ToDecimal(importe) * (-1)); BIZReclamo.UpdateStatus(idReclamo, 2); BIZBitacora.Insert(Utils.GetDateTimeLocal(), Context.User.Identity.GetUserId(), "CONFIRMACION", "Reclamo"); if (Context.User.IsInRole("Administrador")) { gvReclamo.DataSource = BIZReclamo.SelectAll(); } else { gvReclamo.DataSource = BIZReclamo.SelectByIdUser(Context.User.Identity.GetUserId()); gvReclamo.Columns[gvReclamo.Columns.Count - 1].Visible = false; gvReclamo.Columns[gvReclamo.Columns.Count - 2].Visible = false; } gvReclamo.DataBind(); } else if (e.CommandName == "Descargar") { string filePath = e.CommandArgument.ToString(); /*Response.ContentType = ContentType; * Response.AppendHeader("Content-Disposition", "attachment; filename=" + Path.GetFileName(filePath)); * Response.TransmitFile(filePath); * Response.End();*/ /*byte[] Content = File.ReadAllBytes(filePath); //missing ; * Response.Clear(); * * Response.AddHeader("content-disposition", "attachment; filename=" + Path.GetFileName(filePath)); * Response.ContentType = "application/octet-stream"; * Response.WriteFile(filePath); * Response.End();*/ FileInfo ObjArchivo = new System.IO.FileInfo(filePath); Response.Clear(); Response.AddHeader("Content-Disposition", "attachment; filename=" + Path.GetFileName(filePath)); Response.AddHeader("Content-Length", ObjArchivo.Length.ToString()); Response.ContentType = "application/octet-stream"; Response.WriteFile(ObjArchivo.FullName); Response.End(); } }
protected void btnConfirmar_Click(object sender, EventArgs e) { lblErrorMensaje.Visible = false; try { bool pagoReserva = false; if (ddlFormaPago.SelectedValue == "0") { string message = "Debe seleccionar una forma de pago."; ClientScript.RegisterStartupScript(this.GetType(), "Popup", "ShowPopup('" + message + "');", true); lblErrorMensaje.Text = message; lblErrorMensaje.Visible = true; panelTC.Visible = false; panelCC.Visible = false; } else { if (ddlFormaPago.SelectedValue == "ddlTC") { btnConfirmar.ValidationGroup = "ValTarjetaCredito"; //consumir servicio if (TarjetaValida()) { BIZOperacionesTC.Insert(txtNroTarjeta.Text, Convert.ToDateTime("01/" + txtMes.Text + "/" + txtAnio.Text), Convert.ToInt32(txtCodSeg.Text), Convert.ToInt32(Session["Nro_Reserva"].ToString()), DateTime.Now, "", User.Identity.GetUserId()); pagoReserva = true; } else { string message = "Verifique los datos de la tarjeta ingresada"; ClientScript.RegisterStartupScript(this.GetType(), "Popup", "ShowPopup('" + message + "');", true); lblErrorMensaje.Text = message; lblErrorMensaje.Visible = true; } } else { btnConfirmar.ValidationGroup = "ValCuentaCorriente"; try { if (Convert.ToDecimal(Session["Importe_Reserva"].ToString()) < SaldoCuentaCorriente) { BIZCuentaCorriente.UpdateSaldo(Convert.ToInt32(lblCCNro.Text), Convert.ToDecimal(Session["Importe_Reserva"].ToString())); BIZOperacionesCtaCte.Insert(Convert.ToInt32(lblCCNro.Text), Convert.ToDecimal(Session["Importe_Reserva"].ToString()), Utils.GetDateTimeLocal(), "Pago de la reserva Nro: " + Session["Nro_Reserva"].ToString(), "DEBITO"); pagoReserva = true; } else { //string message = "El saldo de su cuenta no es suficiente para pagar la reserva."; //ClientScript.RegisterStartupScript(this.GetType(), "Popup", "ShowPopup('" + message + "');", true); lblSaldoInsuficiente.Visible = true; } } catch (Exception ex) { lblPyEconfirmado.Text = ex.Message; } } } if (pagoReserva) { //BIZReserva.PlazaUpdateStatePayment(Convert.ToInt32(Session["Nro_Reserva"].ToString()), true); BIZReserva.ReservaUpdateStatePayment(Convert.ToInt32(Session["Nro_Reserva"].ToString()), Utils.GetDateTimeLocal(), true); panelTotal.Visible = false; lblPyEconfirmado.Visible = true; btnContinuar.Visible = true; btnMisReservas.Visible = true; lblErrorMensaje.Visible = true; lblErrorMensaje.Text = "Hemos registrado su pago. Le enviaremos el comprabante por email"; } } catch (Exception) { string message = "Se ha producido un error en la operatoria. Volvé a ingresar a Mis Reservas e intentalo nuevamente"; ClientScript.RegisterStartupScript(this.GetType(), "Popup", "ShowPopup('" + message + "');", true); Response.Redirect("MisReservas.aspx"); } }
protected void btnConfirmar_Click(object sender, EventArgs e) { try { DataSet dsPlazaDisponible; if (!FechasValidas()) { if (ddlTipoAlquiler.SelectedValue == "1") { ((SiteMaster)this.Master).ShowMessage("<strong>Verifique las fechas ingresadas</strong>", SiteMaster.WarningType.Warning); } else { ((SiteMaster)this.Master).ShowMessage("<strong>Verifique la fecha y horas ingresadas</strong>", SiteMaster.WarningType.Warning); } ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "pepe", "mostrar();", true); return; } if (ddlTipoAlquiler.SelectedValue == "1") { dsPlazaDisponible = BIZPlaza.SelectDisponibilidadByPlaza(int.Parse(txtIdPlaza.Text), Convert.ToDateTime(txtFechaDesde.Text), Convert.ToDateTime(txtFechaHasta.Text)); } else { dsPlazaDisponible = BIZPlaza.SelectDisponibilidadByPlaza(int.Parse(txtIdPlaza.Text), Convert.ToDateTime(txtFecha.Text), Convert.ToDateTime(txtFecha.Text)); } if (dsPlazaDisponible.Tables.Count > 0 && dsPlazaDisponible.Tables[0].Rows.Count > 0) { if (ddlTipoAlquiler.SelectedValue == "1") { //lblMensaje.Text = "La plaza no está disponible en la fecha seleccionada"; //lblMensaje.Visible = true; ((SiteMaster)this.Master).ShowMessage("<strong>La plaza no está disponible en la fecha seleccionada</strong>", SiteMaster.WarningType.Warning); ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "pepe", "mostrar();", true); return; } else { foreach (DataRow dr in dsPlazaDisponible.Tables[0].Rows) { int horaInicio = int.Parse(dr["horaDesde"].ToString().Substring(0, 2)) * 100; int horaFin = int.Parse(dr["horaHasta"].ToString().Substring(0, 2)) * 100; int horaInicioSeleccionada = int.Parse(txtHoraDesde.Text.Substring(0, 2)) * 100 + 1; int horaFinSeleccionada = int.Parse(txtHoraHasta.Text.Substring(0, 2)) * 100 - 1; if (horaInicioSeleccionada > horaInicio && horaInicioSeleccionada < horaFin) { //lblMensaje.Text = "La plaza no está disponible en la hora seleccionada"; //lblMensaje.Visible = true; ((SiteMaster)this.Master).ShowMessage("<strong>La plaza no está disponible en la hora seleccionada</strong>", SiteMaster.WarningType.Warning); ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "pepe", "mostrar();", true); return; } else if (horaFinSeleccionada > horaInicio && horaFinSeleccionada < horaFin) { //lblMensaje.Text = "La plaza no está disponible en la hora seleccionada"; //lblMensaje.Visible = true; ((SiteMaster)this.Master).ShowMessage("<strong>La plaza no está disponible en la hora seleccionada</strong>", SiteMaster.WarningType.Warning); ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "pepe", "mostrar();", true); return; } } } } //BIZPlaza.UpdateAvailable(Convert.ToInt32(txtIdPlaza.Text), User.Identity.GetUserId()); if (ddlTipoAlquiler.SelectedValue == "1") { BIZReserva.Insert(Convert.ToDateTime(txtFechaDesde.Text), Convert.ToDateTime(txtFechaHasta.Text), null, null, int.Parse(txtIdPlaza.Text), User.Identity.GetUserId()); } else { BIZReserva.Insert(Convert.ToDateTime(txtFecha.Text), Convert.ToDateTime(txtFecha.Text), txtHoraDesde.Text, txtHoraHasta.Text, int.Parse(txtIdPlaza.Text), User.Identity.GetUserId()); } //envio mail BIZBitacora.Insert(Utils.GetDateTimeLocal(), Context.User.Identity.GetUserId(), "ALTA", "Reserva"); try { Send_Info_Reserva(User.Identity.GetUserId()); } catch (Exception) { //Si no envia mail no arrojo error. } txtIdPlaza.Text = ""; txtdescEstacionamiento.Text = ""; txtdescBarrio.Text = ""; txtdatosAdicionales.Text = ""; txtCalle.Text = ""; txtAltura.Text = ""; txtIdPlaza.Visible = true; lblIdPlaza.Visible = true; pnlTab2.Visible = false; pnlTab1.Visible = true; //divPrecio.Visible = false; lblMensaje.Text = string.Empty; lblMensajeError.Text = string.Empty; //cargarPlazas(); Response.Redirect("~/MisReservas.aspx", false); } catch (Exception ex) { Response.Redirect("~/ErrorPage.aspx"); } }
protected void gvReserva_RowEditing(object sender, GridViewEditEventArgs e) { BIZReserva.MisReservasCancelar(int.Parse(gvReserva.Rows[e.NewEditIndex].Cells[0].Text.ToString())); cargarReservas(); }
protected void btnAjustarHora_Click(object sender, EventArgs e) { BIZReserva.ReservaUpdateFinalizado(Convert.ToDateTime(txtFecha.Text), txtHoraDesde.Text); BIZBitacora.Insert(Utils.GetDateTimeLocal(), Context.User.Identity.GetUserId(), "MODIFICACIÓN", "Liberación Plazas"); ((SiteMaster)this.Master).ShowMessage("<strong>Se ajustó la fecha correctamente</strong>", SiteMaster.WarningType.Success); }