protected void BindCarrierData() { try { cls_Carriers obj_carrier = new cls_Carriers(); DataSet ds = new DataSet(); ds = obj_carrier.fn_CarrierLastLoc_Fetch(Convert.ToInt32(Session["role"].ToString()), Convert.ToInt32(Session["fk_CompanyID"].ToString()), Convert.ToInt32(Session["fk_OrgID"].ToString())); car_listbox.DataSource = ds; car_listbox.DataTextField = "carrierName"; car_listbox.DataValueField = "carrierId"; car_listbox.DataBind(); car_listbox.SelectedIndex = 0; cls_Carriers obj_fleet = new cls_Carriers(); DataSet dsFleet = new DataSet(); dsFleet = obj_fleet.fn_FleetLastLoc_Fetch(Convert.ToInt32(Session["role"].ToString()), Convert.ToInt32(Session["task"].ToString())); RadListBoxFleet.DataSource = dsFleet; RadListBoxFleet.DataTextField = "fleetName"; RadListBoxFleet.DataValueField = "fleetID"; RadListBoxFleet.DataBind(); RadListBoxFleet.SelectedIndex = 0; int count = ds.Tables[0].Rows.Count; MapLaod(generateArrayIndex()); } catch (Exception e) { cls_fileHandling fh = new cls_fileHandling(); fh.appendToFile("~/logs/error.txt", DateTime.Now + ": " + e.Message); fh.appendToFile("~/logs/stackTrace.txt", DateTime.Now + ": " + e.StackTrace); } }
protected void bindControls() { try { cls_Carriers obj_carrier = new cls_Carriers(); DataSet ds = new DataSet(); ds = obj_carrier.fn_CarrierLastLoc_Fetch(Convert.ToInt32(Session["role"].ToString()), Convert.ToInt32(Session["fk_CompanyID"].ToString()), Convert.ToInt32(Session["fk_OrgID"].ToString())); txtVehName.DataSource = ds; txtVehName.DataTextField = "CarrierName"; txtVehName.DataValueField = "CarrierId"; txtVehName.DataBind(); int count = ds.Tables[0].Rows.Count; int val = Convert.ToInt32(ds.Tables[0].Rows[0]["carrierId"].ToString()); //ds = obj_carrier.fn_CarrierLastLoc_Fetch(Convert.ToInt32(Session["role"].ToString()), Convert.ToInt32(Session["task"].ToString())); car_listbox.DataSource = ds.Tables[0]; car_listbox.DataTextField = "carrierName"; car_listbox.DataValueField = "carrierId"; car_listbox.DataBind(); car_listbox.SelectedIndex = 0; RadListBoxFleet.DataSource = ds.Tables[1]; RadListBoxFleet.DataTextField = "fleetName"; RadListBoxFleet.DataValueField = "fleetID"; RadListBoxFleet.DataBind(); RadListBoxFleet.SelectedIndex = 0; RadListBoxFleet.Items.Insert(0, new RadListBoxItem("Select All", "-1")); car_listbox.Items.Insert(0, new RadListBoxItem("Select All", "-1")); car_listbox.Items[0].BackColor = System.Drawing.Color.LightBlue; RadListBoxFleet.Items[0].BackColor = System.Drawing.Color.LightBlue; // count = ds.Tables[0].Rows.Count; //MapLoad(generateArrayIndex()); // UpdatePanelReplayMap.Update(); } catch (Exception e) { cls_fileHandling fh = new cls_fileHandling(); fh.appendToFile("~/logs/error.txt", DateTime.Now + ": " + e.Message); fh.appendToFile("~/logs/stackTrace.txt", DateTime.Now + ": " + e.StackTrace); } }