Exemple #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         txtmalop.Enabled = true;
         hienkhoi();
         FillGridView();
         if (Request.QueryString["action"] != null)
         {
             txtmalop.Enabled = false;
             string action = Request.QueryString["action"];
             string malop  = Convert.ToString(Request.QueryString["MaLop"]);
             LopDTO lop    = bll.GetALop(malop);
             txtmalop.Text  = Convert.ToString(lop.MaLop);
             txttenlop.Text = lop.TenLop.ToString();
             string khoi = Convert.ToString(lop.KhoiLop);
             if (khoi == "10")
             {
                 ddlkhoi.SelectedIndex = 0;
             }
             else if (khoi == "11")
             {
                 ddlkhoi.SelectedIndex = 1;
             }
             else
             {
                 ddlkhoi.SelectedIndex = 2;
             }
         }
     }
 }