예제 #1
0
        private DataTable GetItems(string vendorID)
        {
            string    currentCat = CategoryNameLabel.Text;
            DataTable ItemInfo   = StoreMenuInfo.GetItemList(vendorID, currentCat);

            return(ItemInfo);
        }
예제 #2
0
파일: EditItem.cs 프로젝트: DanyaalA/FeedMe
        private void UpdateCategory_Click(object sender, EventArgs e)
        {
            string oldName    = ItemName.Text.Substring(0, ItemName.Text.Length - 9);
            string newCatName = EditCategoryTBox.Text;

            StoreMenuInfo.EditCategory(vendorID, oldName, newCatName);

            ItemName.Text = newCatName + " Category";
        }
예제 #3
0
파일: EditItem.cs 프로젝트: DanyaalA/FeedMe
        private void UpdateItemInfo()
        {
            string id = ItemName.Text;

            if (id.Contains("PicBox"))
            {
                id = id.Substring(0, id.Length - 6);
            }
            else // == "Label". No Other Possibilities
            {
                id = id.Substring(0, id.Length - 5);
            }

            DataTable dt = StoreMenuInfo.GetSpecificItem(vendorID, id);

            //ItemName.Text = dt.Rows[0][2].ToString();
            NameTBox.Text     = dt.Rows[0][2].ToString();
            CategoryTBox.Text = dt.Rows[0][3].ToString();
            DescTBox.Text     = dt.Rows[0][4].ToString();
            PriceTBox.Text    = dt.Rows[0][5].ToString();
            EditItemPanel.BringToFront();
        }
예제 #4
0
        private List <string> GetCategories(string vendorID, out int itemAmm)
        {
            DataTable     MenuTable             = StoreMenuInfo.GetMenuInfo(vendorID); //This Returns all Items from the server
            List <string> DuplicateCategoryList = new List <string>();

            foreach (DataRow Item in MenuTable.Rows)
            {
                DuplicateCategoryList.Add(Item[3].ToString());
            }

            itemAmm = MenuTable.Rows.Count;

            List <string> CategoryList = new List <string>();

            foreach (string category in DuplicateCategoryList)
            {
                if (!CategoryList.Contains(category))
                {
                    CategoryList.Add(category);
                }
            }

            return(CategoryList);
        }
예제 #5
0
파일: EditItem.cs 프로젝트: DanyaalA/FeedMe
 private void UpdateButton_Click(object sender, EventArgs e)
 {
     StoreMenuInfo.EditItem(vendorID, ItemName.Text, NameTBox.Text, CategoryTBox.Text, DescTBox.Text, PriceTBox.Text);
     //ItemName.Text = NameTBox.Text;
 }
예제 #6
0
파일: EditItem.cs 프로젝트: DanyaalA/FeedMe
 private void AddNewCat_Click(object sender, EventArgs e)
 {
     StoreMenuInfo.AddCategory(vendorID, NameTBox.Text, CategoryTBox.Text, DescTBox.Text, PriceTBox.Text);
 }