private void GetProducts() { try { DataSet dsProducts = objHotLeadBL.GetAllProducts(); txtVeckType.Items.Clear(); for (int i = 0; i < dsProducts.Tables[0].Rows.Count; i++) { if (dsProducts.Tables[0].Rows[i]["Vehicletypeid"].ToString() != "0") { ListItem list = new ListItem(); list.Text = dsProducts.Tables[0].Rows[i]["vehicletypename"].ToString(); list.Value = dsProducts.Tables[0].Rows[i]["Vehicletypeid"].ToString(); txtVeckType.Items.Add(list); } } txtVeckType.Items.Insert(0, new ListItem("Select", "0")); } catch (Exception ex) { throw ex; } }
private void AllGroups() { try { DataSet dsGroups = objHotLeadBL.GetAllProducts(); ddlgroups.Items.Clear(); for (int i = 0; i < dsGroups.Tables[0].Rows.Count; i++) { if (dsGroups.Tables[0].Rows[i]["Vehicletypeid"].ToString() != "0") { ListItem list = new ListItem(); list.Text = dsGroups.Tables[0].Rows[i]["vehicletypename"].ToString(); list.Value = dsGroups.Tables[0].Rows[i]["Vehicletypeid"].ToString(); ddlgroups.Items.Add(list); } } //ddlcenters.Items.Insert(0, new ListItem("All", "0")); } catch (Exception ex) { throw ex; } }
//protected void btnl_click(object sender, EventArgs e) //{ // MpUpdaterights.Show(); //} protected void GridCentersUpades_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "PLoc") { ModalPopupExtender2.Show(); try { Session["proid1"] = ""; Session["proid2"] = ""; Session["proid3"] = ""; Session["proid4"] = ""; Session["proid5"] = ""; Session["proid6"] = ""; Session["proid7"] = ""; Session["brandid1"] = ""; Session["brandid2"] = ""; Session["brandid3"] = ""; Session["brandid4"] = ""; Session["brandid5"] = ""; Session["brandid6"] = ""; Session["brandid7"] = ""; DataSet dsTasks3 = objHotLeadBL.UpdatecentersById(Convert.ToInt32(e.CommandArgument.ToString()), 1); DataSet dsTasks4 = objHotLeadBL.UpdatecentersById(Convert.ToInt32(e.CommandArgument.ToString()), 15); DataSet dsTasks5 = objHotLeadBL.UpdatecentersById(Convert.ToInt32(e.CommandArgument.ToString()), 30); DataSet dsTasks6 = objHotLeadBL.UpdatecentersById(Convert.ToInt32(e.CommandArgument.ToString()), 16); DataSet dsTasks7 = objHotLeadBL.UpdatecentersById(Convert.ToInt32(e.CommandArgument.ToString()), 8); DataSet dsTasks8 = objHotLeadBL.UpdatecentersById(Convert.ToInt32(e.CommandArgument.ToString()), 3); DataSet dsTasks9 = objHotLeadBL.UpdatecentersById(Convert.ToInt32(e.CommandArgument.ToString()), 4); DataSet dspro = objHotLeadBL.GetAllProducts(); DropDownList1.DataSource = DropDownList5.DataSource = DropDownList6.DataSource = DropDownList7.DataSource = dspro; DropDownList1.DataValueField = DropDownList5.DataValueField = DropDownList6.DataValueField = DropDownList7.DataValueField = "Vehicletypeid"; DropDownList1.DataTextField = DropDownList5.DataTextField = DropDownList6.DataTextField = DropDownList7.DataTextField = "vehicletypename"; DataSet dsBrands = objHotLeadBL.GetBrandsList(); DropDownList2.DataSource = DropDownList3.DataSource = DropDownList4.DataSource = dsBrands; DropDownList2.DataValueField = DropDownList3.DataValueField = DropDownList4.DataValueField = "BId"; DropDownList2.DataTextField = DropDownList3.DataTextField = DropDownList4.DataTextField = "Brands"; DropDownList1.DataBind(); DropDownList2.DataBind(); DropDownList3.DataBind(); DropDownList4.DataBind(); DropDownList5.DataBind(); DropDownList6.DataBind(); DropDownList7.DataBind(); if (Convert.ToInt32(e.CommandArgument) == 4) { LinkButton1.Text = "INDG"; } else if (Convert.ToInt32(e.CommandArgument) == 1) { LinkButton1.Text = "INBH"; //TextBox1.Text = dsTasks3.Tables[0].Rows[0]["Brand"].ToString(); //TextBox3.Text = dsTasks4.Tables[0].Rows[0]["Brand"].ToString(); //TextBox4.Text = dsTasks5.Tables[0].Rows[0]["Brand"].ToString(); //TextBox7.Text = dsTasks6.Tables[0].Rows[0]["Brand"].ToString(); //TextBox8.Text = dsTasks7.Tables[0].Rows[0]["Brand"].ToString(); //TextBox9.Text = dsTasks8.Tables[0].Rows[0]["Brand"].ToString(); //TextBox10.Text = dsTasks9.Tables[0].Rows[0]["Brand"].ToString(); } else if (Convert.ToInt32(e.CommandArgument) == 2) { LinkButton1.Text = "USMP"; //TextBox1.Text = dsTasks3.Tables[0].Rows[0]["Brand"].ToString(); //TextBox3.Text = dsTasks4.Tables[0].Rows[0]["Brand"].ToString(); //TextBox4.Text = dsTasks5.Tables[0].Rows[0]["Brand"].ToString(); //TextBox7.Text = dsTasks6.Tables[0].Rows[0]["Brand"].ToString(); //TextBox8.Text = dsTasks7.Tables[0].Rows[0]["Brand"].ToString(); //TextBox9.Text = dsTasks8.Tables[0].Rows[0]["Brand"].ToString(); //TextBox10.Text = dsTasks9.Tables[0].Rows[0]["Brand"].ToString(); } else if (Convert.ToInt32(e.CommandArgument) == 3) { LinkButton1.Text = "USWB"; //TextBox1.Text = dsTasks3.Tables[0].Rows[0]["Brand"].ToString(); //TextBox3.Text = dsTasks4.Tables[0].Rows[0]["Brand"].ToString(); //TextBox4.Text = dsTasks5.Tables[0].Rows[0]["Brand"].ToString(); //TextBox7.Text = dsTasks6.Tables[0].Rows[0]["Brand"].ToString(); //TextBox8.Text = dsTasks7.Tables[0].Rows[0]["Brand"].ToString(); //TextBox9.Text = dsTasks8.Tables[0].Rows[0]["Brand"].ToString(); //TextBox10.Text = dsTasks9.Tables[0].Rows[0]["Brand"].ToString(); } TextBox1.Text = dsTasks3.Tables[0].Rows[0]["vehicletypename"].ToString(); TextBox3.Text = dsTasks4.Tables[0].Rows[0]["Brand"].ToString(); TextBox4.Text = dsTasks5.Tables[0].Rows[0]["Brand"].ToString(); TextBox7.Text = dsTasks6.Tables[0].Rows[0]["Brand"].ToString(); TextBox8.Text = dsTasks7.Tables[0].Rows[0]["vehicletypename"].ToString(); TextBox9.Text = dsTasks8.Tables[0].Rows[0]["vehicletypename"].ToString(); TextBox10.Text = dsTasks9.Tables[0].Rows[0]["vehicletypename"].ToString(); } catch { } } }