private void loadProductTypeInput() { var listDB = productIpBO.GetData(u => u.isDelete == false); txtProductName.Items.Clear(); foreach (var item in listDB) { txtProductName.Items.Add(item.Name); } }
// // GET: /Product/ public ActionResult Index(int ? p) { ProductBO cls = new ProductBO(); var model = cls.GetData(); _session.IsLogin = false; int pageSize = 9; int pageNumber = (p ?? 1); return View(model.ToPagedList(pageNumber, pageSize)); }
// // GET: /Product/ public ActionResult Index(int?p) { ProductBO cls = new ProductBO(); var model = cls.GetData(); _session.IsLogin = false; int pageSize = 9; int pageNumber = (p ?? 1); return(View(model.ToPagedList(pageNumber, pageSize))); }
private void loadInformation() { //Form ProductPrice var listPreference = preferenceProductPriceBO.GetData(u => u.isDelete == false); txtProductPrice.Text = listPreference.First(u => u.Name.Trim() == "Sản phẩm").Price.ToString(); txtTimePrice.Text = listPreference.First(u => u.Name.Trim() == "Thời gian").Price.ToString(); //Form ProductInput var listProductInput = productIBO.GetData(u => u.isDelete == false); txtAllProductInputName.ResetText(); txtAllInputPrice.ResetText(); txtAllProductInputName.Items.Clear(); foreach (var item in listProductInput) { txtAllProductInputName.Items.Add(item.Name); } //Form ProductOutput txtAllProductOutputName.ResetText(); txtAllOutputPrice.ResetText(); var listProductOutput = productOBO.GetData(u => u.isDelete == false); txtAllProductOutputName.Items.Clear(); foreach (var item in listProductOutput) { txtAllProductOutputName.Items.Add(item.Name); } //Form TypeWeight var listType = typeWeightBO.GetData(u => u.Type != -1); txtTypeWeight.ResetText(); txtTypeWeight.Items.Clear(); foreach (var item in listType) { txtTypeWeight.Items.Add(item.KG); } }
public void loadProduct() { try { var listDB = productBO.GetData(u => u.isDelete == false); txtProductName.Items.Clear(); foreach (var item in listDB) { txtProductName.Items.Add(item.Name); } txtProductName.Text = listDB.First().Name; txtPrice.Text = productBO.GetPriceByName(txtProductName.Text).ToString(); } catch { } }