コード例 #1
0
        private void initProductDetail()
        {
            ProductDetailModel productDetail = Productdatabase.GetDetailProductByID(IdProduct);

            ImageMain       = productDetail.Image_product;
            ImageSub1       = productDetail.Image_product1;
            ImageSub2       = productDetail.Image_product2;
            NameProduct     = productDetail.Name_product;
            CategoryProduct = productDetail.Category_product;
        }
コード例 #2
0
 private void operationsProduct()
 {
     btnPlus.Click += delegate(object sender, RoutedEventArgs e)
     {
         ProductDetailModel productDetail = Productdatabase.GetDetailProductByID(IdProduct);
         int temp = convertStringToInt(tbNumOfPro.Text) + 1;
         tbNumOfPro.Text = temp + "";
         tbPrice.Text    = productDetail.Price_product * temp + "";
     };
     btnMinus.Click += delegate(object sender, RoutedEventArgs e)
     {
         ProductDetailModel productDetail = Productdatabase.GetDetailProductByID(IdProduct);
         int temp = convertStringToInt(tbNumOfPro.Text) - 1;
         if (temp < 0)
         {
             temp = 0;
         }
         tbNumOfPro.Text = temp + "";
         tbPrice.Text    = productDetail.Price_product * temp + "";
     };
 }