示例#1
0
        private void loadProductTypeInput()
        {
            var listDB = productIpBO.GetData(u => u.isDelete == false);

            txtProductName.Items.Clear();
            foreach (var item in listDB)
            {
                txtProductName.Items.Add(item.Name);
            }
        }
示例#2
0
        //
        // 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));
        }
示例#3
0
        //
        // 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)));
        }
示例#4
0
        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);
            }
        }
示例#5
0
 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 { }
 }