public bool FixDataWithoutImage(Food_Fix food, string nametemp, string name, string price) { //MessageBox.Show(nametemp + " " + name + " " + price); if (dataFood.FixDataWithoutImage(nametemp, name, price)) { food.SetWithoutImage(name, price); return(true); } return(false); }
public bool FixData(Food_Fix food, string nametemp, string name, string price, Byte[] byt) { //MessageBox.Show(nametemp + " " + name + " " + price); if (dataFood.FixData(nametemp, name, price, byt)) { food.Set(byt, name, price); return(true); } return(false); }
public FixFood(Food_Fix food, FormMain fix, string name, string price, Image image) { InitializeComponent(); ReSize(); price = price.Remove(price.Length - 7, 7); this.food = food; this.mainform = fix; this.tbName.Text = this.name = name; this.tbPrice.Text = this.price = price; pictureBox1.Image = image; }
public void AddFood(string name, string price, Byte[] byt, int isFood) { Food_Fix f = new Food_Fix(); ListFood.Add(f); f.Set(byt, name, price, isFood); f.SetParent(this); int unitFood = 5; f.SetTransform(fpFoods.Size.Width / unitFood - unitFood, (fpFoods.Size.Width / unitFood - unitFood) / 5 * 7, 0, 0); if (isFood == 0) { this.fpFoods.Controls.Add(f); } else { this.fpDrinks.Controls.Add(f); } }