protected void Page_Load(object sender, EventArgs e)
        {
            admin = new Admin();
            //    //Dictionary<string, DateTime>  dict = admin.GetBusinessTime();
            //    //foreach (KeyValuePair<string, DateTime> k in dict)
            //    {
            //        TextBox TextBoxKey  = new TextBox();
            //        TextBoxKey.ID = "TextBox" + "key" + k.Key;
            //        TextBoxKey.Text = k.Key;

            //        TextBox TextBoxTime = new TextBox();
            //        TextBoxKey.ID = "TextBox" + "time" + k.Key;
            //        TextBoxTime.Text = k.Value.ToString();

            //        Button buttonUpdate = new Button();
            //        buttonUpdate.ID = k.Key;
            //        buttonUpdate.Text = "Update";
            //        //buttonUpdate.Click += new EventHandler(buttonUpdate_Click);

            //        Panel panel = new Panel();
            //        panel.Controls.Add(TextBoxKey);
            //        panel.Controls.Add(TextBoxTime);

            //        this.divTime.Controls.Add(panel);
            //    }
        }
        public static Admin Login(string pName, string pPwd)
        {
            Admin admin = null;
            bool? isAdmin = false;
            DataContextDataContext dc = new DataContextDataContext();

            ISingleResult<is_adminResult> rs = dc.is_admin(pName, pPwd, ref isAdmin);

            if (isAdmin == true)
            {
                foreach (is_adminResult r in rs)
                {
                    admin = new Admin(r.name, r.pwd, r.mail);
                }
            }
            else
            { }

            return admin;
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            admin = new Admin();

            Restaurant.InitAllDish();
            foreach (Dish d in Restaurant.dishList)
            {
                //TextBox dishNameTB = new TextBox();
                //dishNameTB.ID = "textBoxName" + i;
                //dishNameTB.Text = d.name;

                //TextBox textBoxDes = new TextBox();
                //textBoxDes.ID = "textBoxDes" + i;
                //textBoxDes.Text =

                //TextBox textBoxPrice= new TextBox();
                //textBoxPrice.ID = "textBoxPrice" + i;
            }

            //GridView1.DataSource = Restaurant.dishList;
            //GridView1.DataBind();
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     admin = new Admin();
 }