Example #1
0
        protected void btnsumit_Click(object sender, EventArgs e)
        {
            if (txtaDescripcion.Text.Equals(""))
            {
                lblErrorDescription.Visible = true;
            }
            else
            {
                User               user        = (User)Session["User"];
                Reservation        reservation = new Reservation();
                List <WorkStation> i           = new List <WorkStation>();
                idLab = dataLab.changeNameToId(ddlLab.SelectedValue);

                reservation.Date      = txbfecha.Value;
                reservation.Day       = this.dateToDay(txbfecha.Value);
                reservation.Lab       = dataReservation.getLabId(ddlLab.SelectedItem.Text);
                reservation.User      = user.Id;
                reservation.StartTime = ddlTurnos.SelectedItem.Text;
                reservation.Detalle   = txtaDescripcion.Text;

                i = selectBusy(idLab, reservation.StartTime, reservation.Day);

                Reservation reservation2 = new Reservation(i);
                Session["reservationBusy"] = reservation2;

                Session["Reservation"] = reservation;
                Response.Redirect("SelectReservation.aspx");
            }
        }
Example #2
0
        protected void Button1_Click1(object sender, EventArgs e)
        {
            int idLab;

            if (txtDescripcion.Text.Equals(""))
            {
                if (txtDescripcion.Text.Equals(""))
                {
                    lblErrorDescription.Visible = true;
                }
            }
            else
            {
                idLab = dataLab.changeNameToId(ddlIdLab.SelectedValue);
                dataWorkStation.createWorkStation(txtDescripcion.Text, idLab, 30);
            }
            Response.Redirect("/CRUDWorkStation.aspx");
        }