private void populateGridViewProductDetail() { ProductService.serProduct stock = new ProductService.serProduct(); DataSet dataset = stock.Product_GetStock(); // Create a DataSet from Database if (dataset != null) { // A user can select a person from the grid //GridViewStock.AutoGenerateSelectButton = true; // Set the DataSet to cotrols DataSource GridViewProductDetails.DataSource = dataset; // Bind values to controls rows and columns GridViewProductDetails.DataBind(); // Set control visible GridViewProductDetails.Visible = true; } else { //lbErrorViewPBI.Text = "Sql sentence was not successful."; } }
protected void btSaveAndContinue_Click(object sender, EventArgs e) { //Products ProductService.serProduct productInput = new ProductService.serProduct(); DataSet dataset3 = productInput.Product_GetAll(); DataRow dr3 = dataset3.Tables[0].NewRow(); bool successfull3 = false; if (fromScreenToEntityProducts(dr3)) { dataset3.Tables[0].Rows.Add(dr3); successfull3 = productInput.UpdateProduct(dataset3); } if (successfull3) { LabelErr.Text = "Products details was added"; Session["productid"] = lbProductId.Text; Response.Redirect("ProductPictures.aspx"); } else { LabelErr.Text = "Transaction rolled back"; } }
private void populateGridViewStock() { ProductService.serProduct stock = new ProductService.serProduct(); DataSet dataset = stock.Product_GetStock(); //string x = dataset.GetXml(); //Create a DataSet from Database if (dataset != null) { // A user can select a person from the grid //GridViewStock.AutoGenerateSelectButton = true; // Set the DataSet to cotrols DataSource GridViewStock.DataSource = dataset; // Bind values to controls rows and columns GridViewStock.DataBind(); // Set control visible GridViewStock.Visible = true; } else { //lbErrorViewPBI.Text = "Sql sentence was not successful."; } }
private void getGateroryId() { string description = ""; // Dataset containing ProductService.serProduct prodidtofindimage = new ProductService.serProduct(); DataSet dataset = prodidtofindimage.Product_GetProdIdToFindImage(description); try { foreach (DataRow dr in dataset.Tables[0].Rows) { //DataRow dr = dataset.Tables[0].Rows[0]; int proidforimage = 0; lbproidforimage.Text = dr["productid"].ToString(); proidforimage = Convert.ToInt32(lbproidforimage.Text); Session["productid"] = proidforimage; Image5.ImageUrl = "~/Handler/GetAroundHandler.ashx?productimageId=" + proidforimage; } } catch { } }
private void populateGridViewComment2() { int productid; productid = 222; //// Take customNumber from screen //try //{ // productid = ListBoxCategory.Text; //} //catch //{ // productid = 0; //} //// Load the productbacklog according to productbacklogid //lbPurchaseErr.Text = ""; ProductService.serProduct comment = new ProductService.serProduct(); DataSet dataset = comment.Product_GetMechantComment(productid); // Create a DataSet from Database if (dataset != null) { // A user can select a person from the grid //GridView2.AutoGenerateSelectButton = true; // Set the DataSet to cotrols DataSource GridView2.DataSource = dataset; // Bind values to controls rows and columns GridView2.DataBind(); // Set control visible GridView2.Visible = true; } else { //lbErrorViewPBI.Text = "Sql sentence was not successful."; } }
private void CreateProductId() { bool successful = false; // Dataset containing ProductService.serProduct productId = new ProductService.serProduct(); DataSet dataset = productId.Product_CreateProductId(); try { foreach (DataRow dr in dataset.Tables[0].Rows) { successful = true; string s = dr["productid"].ToString(); lbProductId.Text = dr["productid"].ToString(); } } catch { } if (successful) { //lbPBIErrorMessage.Text = "Task Id created"; // New list must be created //loadTask(); // Initial values to screen //setInitialValues(); } else { LabelErr.Text = "Problem with customer number"; } }