protected void Page_Load(object sender, EventArgs e) { // btnAdd.Attributes.Add("onclick", "clcontent();"); changeLinks(); getCompanyName(); if (!IsPostBack) { dropLocation.bindLocationDropdown(drpLocation); //Bind location into dropdown dropLocation.bindShelfDropdown(drpShelf); //Bind shelf into dropdown // dropLocation.bindProductDropdown(drpProduct);//bind all product intodropdown string Check = string.Empty; Check = Request.QueryString["check"]; if (Check != "" && Check != null) { drpLocation.SelectedValue = Request.QueryString["loc"]; drpShelf.SelectedValue = Request.QueryString["shefId"]; txtKeyWord.Text = Request.QueryString["strKey"]; int perPage = Convert.ToInt32(Request.QueryString["perPage"]); if (perPage == 10) { drpPerPage.SelectedValue = "Select"; } else { drpPerPage.SelectedValue = Convert.ToString(perPage); } } } }
protected void Page_Load(object sender, EventArgs e) { btnAdd.Attributes.Add("onclick", "clcontent();"); changeLinks(); getCompanyName(); if (!IsPostBack) { dropSelf.bindShelfDropdown(drpShelf);//Bind shelf into dropdown lblMsg.Text = ""; } }
protected void Page_Load(object sender, EventArgs e) { btnUpdate.Attributes.Add("onclick", "clcontent();"); changeLinks(); getCompanyName(); try { if (!IsPostBack) { DataSet dsProductList = new DataSet(); dropSelf.bindShelfDropdown(drpShelf);//Bind shelf into dropdown lblMsg.Text = ""; int productId = Convert.ToInt32(Request.QueryString["productId"]); int asileId = Convert.ToInt32(Request.QueryString["asileId"]); int shelf = Convert.ToInt32(Request.QueryString["shf"]); dsProductList = dbEditInfo.SelectProductDeatils(productId, asileId, shelf); if (dsProductList.Tables.Count > 0) { if (dsProductList != null && dsProductList.Tables.Count > 0 && dsProductList.Tables[0].Rows.Count > 0) { //StringWriter myWriter = new StringWriter(); //HttpUtility.HtmlDecode(txtTitle.Text.ToString(), myWriter); //String test = myWriter; // txtTitle.Text = Convert.ToString(dsProductList.Tables[0].Rows[0]["product_title"]); txtTitle.Text = Server.HtmlDecode(Convert.ToString(dsProductList.Tables[0].Rows[0]["product_title"])); drpShelf.SelectedValue = Convert.ToString(dsProductList.Tables[0].Rows[0]["shelf_id"]); //drpType.SelectedValue = Convert.ToString(dsProductList.Tables[0].Rows[0]["ProductType"]); drpType.SelectedValue = Convert.ToString(dsProductList.Tables[0].Rows[0]["productlink_tax"]); ViewState["ShelfInfo"] = Convert.ToString(dsProductList.Tables[0].Rows[0]["shelf_id"]); ViewState["imageName"] = Convert.ToString(dsProductList.Tables[0].Rows[0]["product_image"]); ViewState["imageNameLarge"] = Convert.ToString(dsProductList.Tables[0].Rows[0]["product_image2"]); txtSize.Text = Convert.ToString(dsProductList.Tables[0].Rows[0]["product_size"]); if (Convert.ToString(dsProductList.Tables[0].Rows[0]["productlink_presale"]) == null || Convert.ToString(dsProductList.Tables[0].Rows[0]["productlink_presale"]) == "") { txtPrePrice.Text = ""; } else { txtPrePrice.Text = Convert.ToString(Math.Round(Convert.ToDouble(dsProductList.Tables[0].Rows[0]["productlink_presale"]), 2)); } txtPrice.Text = Convert.ToString(Math.Round(Convert.ToDouble(dsProductList.Tables[0].Rows[0]["productlink_price"]), 2)); txtBuyPrice.Text = Convert.ToString(Math.Round(Convert.ToDouble(dsProductList.Tables[0].Rows[0]["productlink_buyprice"]), 2)); txtSodaDeposit.Text = Convert.ToString(dsProductList.Tables[0].Rows[0]["productlink_soda"]); txtStore.Text = Convert.ToString(dsProductList.Tables[0].Rows[0]["product_store"]); if (Convert.ToString(dsProductList.Tables[0].Rows[0]["productlink_suggest"]) == "1") { chkSuggestItem.Checked = true; } if (Convert.ToString(dsProductList.Tables[0].Rows[0]["productlink_featured"]) == "1") { chkRecomItem.Checked = true; } if (Convert.ToString(dsProductList.Tables[0].Rows[0]["productlink_hide"]) == "1") { chkHideItem.Checked = true; } FCKeditor1.Value = Convert.ToString(dsProductList.Tables[0].Rows[0]["product_description"]); FCKeditor2.Value = Convert.ToString(dsProductList.Tables[0].Rows[0]["product_comments"]); } } } } catch (Exception ex) { Response.Write(ex.Message); } }