Beispiel #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (this.IsPostBack == false)
     {
         _AreaSelected = (AreaItemManager.GetAll().Count == 0) ? "" : AreaItemManager.GetAll()[0].Id;
     }
     else
     {
         //判斷選項是否存在
         _AreaSelected = (AreaItemManager.GetById(_AreaSelected) != null) ? _AreaSelected : "";
     }
 }
Beispiel #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        _Argument = LeftHand.Gadget.Encoder.DictionaryDecoder(Server.UrlDecode(Request.QueryString.ToString()));

        switch (_Argument["Mode"])
        {
        case "Add":
            _AreaItem = new AreaItem("", -1);
            break;

        case "Edit":
            _AreaItem = AreaItemManager.GetById(_Argument["Id"]);
            break;
        }
    }
Beispiel #3
0
 private void Render_SchoolItemList()
 {
     this.vSchoolList.DataSource = SchoolItemManager.GetByArea(AreaItemManager.GetById(_AreaSelected));
     this.vSchoolList.DataBind();
 }