예제 #1
0
파일: Order.aspx.cs 프로젝트: xiabui/OTO-LC
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int          productID = int.Parse(Request.QueryString["id"]);
                DL_Product   productDL = new DL_Product();
                DL_Store     storeDL   = new DL_Store();
                ProductModel product   = productDL.GetDetailProductWithId(productID);
                lblProductName.Text = product.ProductName;
                lblGiaBan.Text      = product.Price;

                ddlSubStore.DataSource  = ddlStore.DataSource = storeDL.GetData();
                ddlStore.DataValueField = ddlSubStore.DataValueField = "store_id";
                ddlStore.DataTextField  = ddlSubStore.DataTextField = "store_name";
                ddlSubStore.DataBind();
                ddlStore.DataBind();
            }
        }
예제 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int     productId = int.Parse(Request.QueryString["id"]);
                Product product   = new Product();
                product = productDL.GetDetailProductWithId(productId);

                Image1.ImageUrl      = "~/Images/" + product.ProductImage;
                lblProductName.Text  = product.ProductName;
                lblProductPrice.Text = product.Price;
                lblContryMade.Text   = product.From;
                lblCarType.Text      = product.CarType;
                lblEngineenType.Text = product.EngineenType;
                lblGasCap.Text       = product.GasCap.ToString();
                lblIsUsed.Text       = product.Used ? "Used" : "New";
                lblMileage.Text      = product.MileAge.ToString();
                lblNumCap.Text       = product.NumberCap.ToString();
            }
        }
예제 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                productID = int.Parse(Request.QueryString["id"]);

                Models.ProductModel product = new Models.ProductModel();
                product = productDL.GetDetailProductWithId(productID);

                imgProduct.ImageUrl  = "Images/" + product.ProductImage;
                lblProductName.Text  = product.ProductName;
                lblProductPrice.Text = product.Price + " VND";
                lblContryMade.Text   = product.CountryMade;
                lblCarType.Text      = product.CatName;
                lblEngineenType.Text = product.EngineenType;
                lblGasCap.Text       = product.GasCapacity.ToString();
                lblIsUsed.Text       = product.Used ? "Used car" : "New car";
                lblMileage.Text      = product.MileAge.ToString();
                lblNumCap.Text       = product.NumberCapacity.ToString();
                lblYearMade.Text     = product.YearMade.ToString();
            }
        }