Esempio n. 1
0
 /// <summary>
 /// 換樓層(2013-0430)
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void DDL_Floor_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         //分新舊
         if (DDL_Floor.SelectedValue != "-1" && !CB_NewFormat.Checked)
         {
             DDL_Area.DataSource = sp.GetArea(_areaId, DDL_Floor.SelectedValue);
             DDL_Area.DataBind();
         }
         else if (CB_NewFormat.Checked)
         {
             DDL_Area.DataSource = sp.GetAreaAll(_areaId);
             DDL_Area.DataBind();
         }
         else
         {
             DDL_Area.Visible = false;
         }
         ListItem aa = new ListItem();
         aa.Text     = "全部";
         aa.Value    = "-1";
         aa.Selected = true;
         DDL_Area.Items.Add(aa);
     }
     catch (Exception ex)
     {
         Response.Write("系統發生錯誤 " + ex.Message);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// 切換樓層
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void ddl_Floor_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         ddl_Area.DataSource = sp.GetAreaAll(_areaId);
         ddl_Area.DataBind();
         ddl_Area_SelectedIndexChanged(ddl_Area, null);
     }
     catch (Exception ex)
     {
         Response.Write("系統發生錯誤 " + ex.Message);
     }
 }
Esempio n. 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Account"] == null)
            {
                Response.Write(" <script> parent.document.location= '../logout.aspx' </script> ");
                Response.End();
            }
            else
            {
                account = Session["Name"].ToString();

                if (!IsPostBack)
                {
                    radioStore_SelectedIndexChanged(sender, e);
                    SetDDL(ddl_Shelf1);
                    SetDDL(ddl_Shelf2);
                    SetDDL(ddl_Shelf3);
                    ddl_Area.DataSource = sp.GetAreaAll(_areaId);
                    ddl_Area.DataBind();
                    ddl_Area_SelectedIndexChanged(ddl_Area, null);
                }
            }
        }