protected void Page_Load(object sender, EventArgs e) { try { if (fileUploadImage.IsPosting) { Session["FileImageName"] = Globals.ProcessFileUpload(fileUploadImage, true); } if (!IsPostBack) { string Action = Globals.GetStringFromQueryString("Action"); Globals.BindLanguageToDDL(ddlLanguage); CommonDropDownList objCatDDL = new CommonDropDownList(); objCatDDL.LoadDropDownListCatalog(ddlCatalog, ddlLanguage.SelectedValue, "--- Vui lòng chọn ---"); objCatDDL.LoadDropDownListProducer(ddlProducer, ddlLanguage.SelectedValue, false); ddlProducer.SelectedIndex = 1; ddlCatalog.SelectedIndex = 1; if (Action == "Edit") { LoadDataEdit(); } } } catch { } }
protected void ddlLanguage_SelectedIndexChanged(object sender, EventArgs e) { CommonDropDownList objDDL = new CommonDropDownList(); objDDL.LoadDropDownListCatalog(ddlCatalog, ddlLanguage.SelectedValue, "--- Tất cả ---"); LoadGridViewProduct(ddlLanguage.SelectedValue, Convert.ToInt32(ddlCatalog.SelectedValue)); }
protected void Page_Load(object sender, EventArgs e) { if (fileUploadImage0.IsPosting) { FileImageName[0] = Globals.ProcessFileUpload(fileUploadImage0, true); } if (fileUploadImage1.IsPosting) { FileImageName[1] = Globals.ProcessFileUpload(fileUploadImage1, true); } if (fileUploadImage2.IsPosting) { FileImageName[2] = Globals.ProcessFileUpload(fileUploadImage2, true); } if (fileUploadImage3.IsPosting) { FileImageName[3] = Globals.ProcessFileUpload(fileUploadImage3, true); } if (fileUploadImage4.IsPosting) { FileImageName[4] = Globals.ProcessFileUpload(fileUploadImage4, true); } if (!IsPostBack) { string Action = Globals.GetStringFromQueryString("Action"); Globals.BindLanguageToDDL(ddlLanguage); CommonDropDownList objDDL = new CommonDropDownList(); objDDL.LoadDropDownListCatalog(ddlCatalog, ddlLanguage.SelectedValue, "--- Vui lòng chọn ---"); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Globals.BindLanguageToDDL(ddlLanguage); Lang = ddlLanguage.SelectedValue; CommonDropDownList objDDL = new CommonDropDownList(); objDDL.LoadDropDownListCatalog(ddlCatalog, Lang, "--- Tất cả ---"); LoadAllProduct(Lang); } }
protected void Page_Load(object sender, EventArgs e) { string Lang = Globals.GetLang(); if (!IsPostBack) { LanguageXML langXml = new LanguageXML("Language" + Lang); lblSubject.InnerText = langXml.GetString("Web", "Text", "QuickSearch"); btnSearch.Text = langXml.GetString("Web", "Text", "Search"); CommonDropDownList ddl = new CommonDropDownList(); ddl.LoadDropDownListCatalog(ddlCatalog, Lang, langXml.GetString("Web", "DisplayProduct", "ProductCatalog")); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Globals.BindLanguageToDDL(ddlLanguage); CommonDropDownList objDDL = new CommonDropDownList(); objDDL.LoadDropDownListCatalog(ddlCatalog, ddlLanguage.SelectedValue, "--- Vui lòng chọn ---"); string Lang = Globals.GetStringFromQueryString("Lang"); int CatID = Globals.GetIntFromQueryString("CatID"); int ProductID = Globals.GetIntFromQueryString("ProductID"); ddlLanguage.SelectedValue = Lang; ddlCatalog.SelectedValue = CatID.ToString(); LoadProductListByCatID(Lang, CatID); ddlProduct.SelectedValue = ProductID.ToString(); LoadPhotoList(Lang, ProductID); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string Action = Globals.GetStringFromQueryString("Action"); Globals.BindLanguageToDDL(ddlLanguage); Lang = ddlLanguage.SelectedValue; Globals.BindLanguageToDDL(ddlLanguage2); CommonDropDownList objDDL = new CommonDropDownList(); objDDL.LoadDropDownListCatalog(ddlCatalog, Lang, "Root"); LoadTreeViewCatalog(TreeViewCatalog, Lang); if (Action == "Edit") { lblTitle1.InnerText = "Cập nhật Danh mục Sản phẩm"; lblTitle2.InnerText = "Cập nhật Danh mục Sản phẩm"; LoadDataEdit(); linkAdd.Visible = true; } } }
private void LoadDataEdit() { try { Catalog obj = new Catalog(); int CatID = Globals.GetIntFromQueryString("CatID"); int ParentCatID = obj.GetParentCatIDByCatalogID(CatID); string LangEdit = Globals.GetStringFromQueryString("Lang"); DataSet ds = obj.GetCatalogByCatalogID("GroupCat", CatID, LangEdit); ddlLanguage.SelectedValue = LangEdit; CommonDropDownList objDDL = new CommonDropDownList(); objDDL.LoadDropDownListCatalog(ddlCatalog, LangEdit, "Root"); ddlCatalog.SelectedValue = ParentCatID.ToString(); txtCatalogName.Value = Convert.ToString(ds.Tables[0].Rows[0]["TenNhom"]); txtCatalogOrder.Value = Convert.ToString(ds.Tables[0].Rows[0]["STT"]); ddlLanguage2.SelectedValue = ddlLanguage.SelectedValue; LoadTreeViewCatalog(TreeViewCatalog, ddlLanguage2.SelectedValue); } catch { } }
private void LoadDataEdit() { try { string Lang = Globals.GetStringFromQueryString("Lang"); int ProductID = Globals.GetIntFromQueryString("ProductID"); int CatID = Globals.GetIntFromQueryString("CatID"); Product objProduct = new Product(); DataSet dsProduct = new DataSet(); lblTitle1.InnerText = "Cập nhật Sản phẩm"; lblTitle2.InnerText = "Cập nhật Sản phẩm"; ddlLanguage.SelectedItem.Value = Lang; ddlCatalog.Enabled = true; CommonDropDownList objCatDDL = new CommonDropDownList(); objCatDDL.LoadDropDownListCatalog(ddlCatalog, Lang, "--- Vui lòng chọn ---"); ddlCatalog.SelectedValue = CatID.ToString(); dsProduct = objProduct.GetProductByProductID("ProductCat", ProductID, Lang); ddlProducer.SelectedValue = Convert.ToString(dsProduct.Tables[0].Rows[0]["ProducerID"]); txtProductName.Value = Convert.ToString(dsProduct.Tables[0].Rows[0]["TenGoi"]); txtProductCode.Value = Convert.ToString(dsProduct.Tables[0].Rows[0]["MaSanPham"]); txtPrice.Value = Convert.ToString(dsProduct.Tables[0].Rows[0]["GiaBan"]); txtPriceAfterSaleOff.Value = Convert.ToString(dsProduct.Tables[0].Rows[0]["GiaKhuyenMai"]); txtCurrency.Value = Convert.ToString(dsProduct.Tables[0].Rows[0]["NgoaiTe"]); txtExcerpt.Value = Convert.ToString(dsProduct.Tables[0].Rows[0]["ThongTin1"]); fckProductDesc.Value = Convert.ToString(dsProduct.Tables[0].Rows[0]["ThongTin2"]); ImageProduct.Src = Globals.GetUploadsUrl() + Convert.ToString(dsProduct.Tables[0].Rows[0]["Anh"]); ImageProduct.Width = 300; ImageProduct.Height = 300; Session["FileImageName"] = Convert.ToString(dsProduct.Tables[0].Rows[0]["Anh"]); txtKeyword.Value = Convert.ToString(dsProduct.Tables[0].Rows[0]["Keyword"]); //ddlProducer.SelectedValue = Convert.ToString(dsProduct.Tables[0].Rows[0]["ProducerID"]); cbIsNew.Checked = Convert.ToBoolean(dsProduct.Tables[0].Rows[0]["IsNew"].ToString()); cbIsHot.Checked = Convert.ToBoolean(dsProduct.Tables[0].Rows[0]["IsHot"].ToString()); cbIsBestSeller.Checked = Convert.ToBoolean(dsProduct.Tables[0].Rows[0]["IsBestSeller"].ToString()); } catch { } }
protected void ddlLanguage_SelectedIndexChanged(object sender, EventArgs e) { CommonDropDownList objDDL = new CommonDropDownList(); objDDL.LoadDropDownListCatalog(ddlCatalog, ddlLanguage.SelectedValue, "Root"); }