protected void Page_Load(object sender, EventArgs e) { WorkStation workStation = (WorkStation)Session["workStationSession"]; DataLab dataLab = new DataLab(); int idLab = workStation.IdLab; if (!IsPostBack) { lblIDEDIT.Text = Convert.ToString(workStation.Id); txtDescripcionEDIT.Text = workStation.Description; DropDownList1.SelectedValue = dataLab.changeIdToName(idLab); chbxRESERVADOEDIT.Checked = workStation.Busy; } DropDownList ddl = dataLab.readLabName(); DropDownList1.DataSource = ddl.DataSource; DropDownList1.DataTextField = "name"; DropDownList1.DataValueField = "name"; DropDownList1.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { User user = (User)Session["User"]; if ((User)Session["User"] == null) { Response.Redirect("/index.aspx"); } DataLab dataLab = new DataLab(); DropDownList ddl = dataLab.readLabName(); ddlLab.DataSource = ddl.DataSource; ddlLab.DataTextField = "name"; ddlLab.DataValueField = "name"; ddlLab.DataBind(); }
public BusinessLab() { dataLab = new DataLab(); }