Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DataTable dt = new DataTable();

            if (!IsPostBack)
            {
                dt = Configuracion.Listado("*", " 1=1 ", "");

                if (dt.Rows.Count > 0)
                {
                    ConfiguracionTextBox.Text = dt.Rows[0]["Impuesto"].ToString();
                }
                else
                {
                    Mensajes.ShowToastr(this, "Error", "No hay Configuracion", "Error");
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Usuarios        Usuario       = new Usuarios();
                Configuraciones Configuracion = new Configuraciones();

                DataTable dt = new DataTable();

                dt = Configuracion.Listado("*", " 1=1 ", "");

                if (dt.Rows.Count > 0)
                {
                    ImpuestoTextBox.Text = dt.Rows[0]["Impuesto"].ToString();
                }
                else
                {
                    Mensajes.ShowToastr(this, "Error", "No hay Configuracion", "Error");
                }

                LlenarDropDownList();
                UsuarioIdLabel.Text = Context.User.Identity.Name;
                if (Usuarios.Id == 0)
                {
                    Usuario.NombreUsuario = UsuarioIdLabel.Text;
                    Usuario.Comprobar();
                }
                EsActivoCheckBox.Checked = true;
                FechaCreacionLabel.Text  = DateTime.Now.ToString("dd/MM/yyyy");
                EliminarButton.Visible   = false;

                if (Request.QueryString["Id"] != null)
                {
                    id = Seguridad.ValidarEntero(Request.QueryString["Id"].ToString());
                    Reservacion.SolicitudId = id;
                }

                SolicitudIdLabel.Text   = Reservacion.SolicitudId.ToString();
                DetalleGridView.Visible = false;

                FechaInicialTextBox.Attributes.Add("readonly", "true");
                FechaFinalTextBox.Attributes.Add("readonly", "true");
                CalendarExtender1.StartDate = DateTime.Now;
            }
        }