Beispiel #1
0
        protected void btnAddItem_Click(object sender, EventArgs e)
        {
            Menu_Item menuItem = new Menu_Item();


            string str_options = txtOptions.Text;

            string[] options = str_options.Split(',');

            menuItem.options = options;

            menuItem.title       = txtTitle.Text;
            menuItem.description = txtDescription.Text;
            menuItem.price       = float.Parse(txtPrice.Text);
            menuItem.image       = fileUpload.FileBytes;

            string menuitem_id = menuItem.CreateMenuItem(Session["username"].ToString());

            if (menuItem.options != null)
            {
                menuItem.CreateMenuItemOption(menuitem_id);
            }
        }