Esempio n. 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Dictionary <string, object> param = new Dictionary <string, object>();
         if (Request.Params["id"] == null)
         {
             Response.Redirect("~/");
         }
         int id = Int32.Parse(Request.Params["id"]);
         param.Add("Employees.ID_employee", id);
         HiddenField1.Value = id.ToString();
         empl        = EmployeeData.getEmployees(param);
         Label1.Text = empl[0].First_name + " " + empl[0].Last_name;
         DatabaseTable <Shifts> shif = ShiftData.getShifts(null);
         RadioButtonList1.DataValueField = "ID_shift";
         RadioButtonList1.DataTextField  = "Name_of_shift";
         RadioButtonList1.DataSource     = shif;
         RadioButtonList1.DataBind();
     }
 }