public FFoodEdit(string id, string ten, string gia, string giamgia, string trangthai, string loai) { cFood = new CFood(); sua = false; luu = false; them = false; InitializeComponent(); this.id = id; tbTen.Text = ten; tbGia.Text = gia; tbGiamGia.Text = giamgia; cbbLoai.Text = loai; if (trangthai == "Hiện có") { cbTrangThai.Checked = true; } else { cbTrangThai.Checked = false; } try { Bitmap bm1 = new Bitmap(Application.StartupPath + "\\image\\" + id.ToString().Trim() + ".jpg"); Bitmap bm2 = new Bitmap(bm1); bm1.Dispose(); btHinh.BackgroundImage = bm2; } catch { } }
public FFoodEdit() { InitializeComponent(); cFood = new CFood(); them = true; sua = false; luu = false; cbTrangThai.Checked = true; }
public UCMonAnQlyThucDon(string id, string ten, string gia, string giamgia, string trangthai, string active, string loai) { InitializeComponent(); cFood = new CFood(); Id = id; lbTen.Text = ten; lbGia.Text = gia; lbGiamGia.Text = giamgia; lbLoai.Text = loai; if (active == "Yes") { luulai = false; } else { luulai = true; } if (trangthai == "Yes") { lbTrangThai.Text = "Hiện có"; lbTrangThai.ForeColor = Color.Green; } else { lbTrangThai.Text = "Hiện không có"; lbTrangThai.ForeColor = Color.Red; } try { Bitmap bm1 = new Bitmap(Application.StartupPath + "\\image\\" + id.ToString().Trim() + ".jpg"); Bitmap bm2 = new Bitmap(bm1); bm1.Dispose(); btnPictureFood.BackgroundImage = bm2; } catch { } }
public void CreateFoodbtn(Panel Order) { CBill SBill = new CBill(); them = SBill.GetID_Bill(location, ref ID_bill); CFood sFood = new CFood(); List <GetFood_Result> dtFood = new List <GetFood_Result>(); dtFood = sFood.GetFood("All", "All", "Yes"); listFood = dtFood; if (them == false) { LoadAmount(listCount); } else { for (int i = 0; i < dtFood.Count; i++) { listCount.Add(0); } } CreateUser(Order); lb1 = new Label() { Location = new Point(20, 220) }; lb1.AutoSize = true; this.Bill.Controls.Add(lb1); if (them == false) { load(); } LoadAmount(OldListCount); }
public UCMonAnQlyThucDon() { InitializeComponent(); cFood = new CFood(); }
public FQlyMonCu() { InitializeComponent(); cFood = new CFood(); }