protected void getBinPriorityList(string zone_id, string ward_id) { try { if (zone_id != "0" && ward_id == "0") { ds = ob.getBinPriorityList(zone_id); ListLeft.DataSource = ds; ListLeft.DataValueField = "BinId"; ListLeft.DataTextField = "Bin"; ListLeft.DataBind(); } else if (zone_id != "0" && ward_id != "0") { ds = ob.getBinPriorityList_ward_zone(zone_id, ward_id); ListLeft.DataSource = ds; ListLeft.DataValueField = "BinId"; ListLeft.DataTextField = "Bin"; ListLeft.DataBind(); } else if (zone_id == "0" && ward_id == "0") { ListLeft.Items.Clear(); } } catch { } }
protected void ddlRoute_SelectedIndexChanged(object sender, EventArgs e) { ListBoxAllotment.Items.Clear(); if (ddlRoute.SelectedValue != "0") { ds = con.FN_ExecuteQuerySingle("select * from Mst_Drivers"); ListLeft.DataSource = ds; ListLeft.DataValueField = "DriverID"; ListLeft.DataTextField = "DriverName"; ListLeft.DataBind(); ListLeft.Items.Add(new ListItem("", "")); DataSet ds1 = new DataSet(); ds1 = con.FN_ExecuteQuerySingle("select * from Mst_Vehicles"); ListRight.DataSource = ds1; ListRight.DataValueField = "vehicle_num"; ListRight.DataTextField = "vehicle_type"; ListRight.DataBind(); ListRight.Items.Add(new ListItem("", "")); divlistbox.Visible = true; dvgrvDetails.Visible = true; } else { dvgrvDetails.Visible = false; } }