예제 #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 : "";
     }
 }
예제 #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;
        }
    }
예제 #3
0
 private void Render_SchoolItemList()
 {
     this.vSchoolList.DataSource = SchoolItemManager.GetByArea(AreaItemManager.GetById(_AreaSelected));
     this.vSchoolList.DataBind();
 }