private void fillEntity(string Type) { DataSet thisDataSet = clsCommonHandler.GetEmployeesDetails("NEMP", Type); ListBox1.DataValueField = "EPD_EMPID"; ListBox1.DataTextField = "EPD_FIRST_NAME"; ListBox1.DataSource = thisDataSet.Tables[0]; ListBox1.DataBind(); ListBox7.DataValueField = "EPD_EMPID"; ListBox7.DataTextField = "EPD_FIRST_NAME"; ListBox7.DataSource = thisDataSet.Tables[0]; ListBox7.DataBind(); }
public void fillEmplist() { DataSet thisDataSet = clsCommonHandler.GetEmployeesDetails("NEMP", ""); ListBox1.DataValueField = "EPD_EMPID"; ListBox1.DataTextField = "EPD_FIRST_NAME"; ListBox1.DataSource = thisDataSet.Tables[0]; ListBox1.DataBind(); ListBox7.DataValueField = "EPD_EMPID"; ListBox7.DataTextField = "EPD_FIRST_NAME"; ListBox7.DataSource = thisDataSet.Tables[0]; ListBox7.DataBind(); }
private DataSet fillEntities() { string mgrId = Session["uid"].ToString(); string levelId = Session["levelId"].ToString(); SqlConnection con = new SqlConnection(m_connectons); if (con.State == ConnectionState.Closed) { con.Open(); } SqlCommand cmd = new SqlCommand("USP_GET_EMPDETAILS_ROLEWISE", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@EmployeeCode", mgrId); SqlDataAdapter adpt = new SqlDataAdapter(cmd); DataSet thisDataSet = new DataSet(); adpt.Fill(thisDataSet); if (con.State == ConnectionState.Open) { con.Close(); } //Employee ListBox1.DataValueField = "EOD_EMPID"; ListBox1.DataTextField = "EmployeeName"; ListBox1.DataSource = thisDataSet.Tables[0]; ListBox1.DataBind(); ListBox7.DataValueField = "EOD_EMPID"; ListBox7.DataTextField = "EmployeeName"; ListBox7.DataSource = thisDataSet.Tables[0]; ListBox7.DataBind(); return(thisDataSet); }
protected void ListBox6_OnTextChanged() { string conn = System.Configuration.ConfigurationSettings.AppSettings["DBCONN_Meeting"]; string sql_LAYER = combine_List_box(ListBox6); string sql = "select distinct(t.model_name) as model_name from tlms_main t where t.LAYER in(" + sql_LAYER + ") and t.model_name is not null"; ListBox7.Items.Clear(); ListBox7.DataTextField = "model_name"; ListBox7.DataValueField = "model_name"; DataSet ds_process = new DataSet(); ds_process = func.get_dataSet_access(sql, conn); ListBox7.DataSource = ds_process.Tables[0]; ListBox7.DataBind(); }
public void fillEmplist() { string strsql; strsql = "SELECT EPD_EMPID,replace(convert(char(40),ltrim(EPD_FIRST_NAME))+EPD_EMPID,' ',' ' ) as EPD_FIRST_NAME" + " FROM ENT_EMPLOYEE_PERSONAL_DTLS " + " inner join ENT_EMPLOYEE_OFFICIAL_DTLS on EPD_EMPID=EOD_EMPID WHERE EPD_ISDELETED=0 and EOD_ACTIVE=1 "; // + " inner join ENT_EMPLOYEE_OFFICIAL_DTLS on EPD_EMPID=EOD_EMPID WHERE EPD_ISDELETED=0"; SqlCommand cmd = new SqlCommand(strsql, conString); SqlDataAdapter adpt = new SqlDataAdapter(cmd); DataSet thisDataSet = new DataSet(); adpt.Fill(thisDataSet); ListBox1.DataValueField = "EPD_EMPID"; ListBox1.DataTextField = "EPD_FIRST_NAME"; ListBox1.DataSource = thisDataSet.Tables[0]; ListBox1.DataBind(); ListBox7.DataValueField = "EPD_EMPID"; ListBox7.DataTextField = "EPD_FIRST_NAME"; ListBox7.DataSource = thisDataSet.Tables[0]; ListBox7.DataBind(); }
private DataSet fillEntities() { string mgrId = Session["uid"].ToString(); string levelId = Session["levelId"].ToString(); SqlConnection con = new SqlConnection(m_connectons); if (con.State == ConnectionState.Closed) { con.Open(); } SqlCommand cmd = new SqlCommand("USP_GET_EMPDETAILS_ROLEWISE", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@EmployeeCode", mgrId); SqlDataAdapter adpt = new SqlDataAdapter(cmd); DataSet thisDataSet = new DataSet(); adpt.Fill(thisDataSet); if (con.State == ConnectionState.Open) { con.Close(); } ListBox1.DataValueField = "EOD_EMPID"; ListBox1.DataTextField = "EmployeeName"; ListBox1.DataSource = thisDataSet.Tables[0]; ListBox1.DataBind(); ListBox7.DataValueField = "EOD_EMPID"; ListBox7.DataTextField = "EmployeeName"; ListBox7.DataSource = thisDataSet.Tables[0]; ListBox7.DataBind(); return(thisDataSet); /* * * DataTable dtCompany = thisDataSet.Tables[4].DefaultView.ToTable(true, "CompanyID", "COMPANY_NAME"); * * ListBox2.DataValueField = "CompanyID"; * ListBox2.DataTextField = "COMPANY_NAME"; * * ListBox2.DataSource = dtCompany; * * ListBox2.DataBind(); * * * ListBox8.DataValueField = "CompanyID"; * ListBox8.DataTextField = "COMPANY_NAME"; * ListBox8.DataSource = dtCompany; * * ListBox8.DataBind(); * * //DataTable dtCategory = thisDataSet.Tables[0].DefaultView.ToTable(true, "CategoryID", "Category_NAME"); * * //LstCategory.DataValueField = "CategoryID"; * //LstCategory.DataTextField = "Category_NAME"; * * //LstCategory.DataSource = dtCategory; * * //LstCategory.DataBind(); * * * DataTable dtDepartment = thisDataSet.Tables[2].DefaultView.ToTable(true, "DepartmentID", "Department_NAME"); * * ListBox5.DataValueField = "DepartmentID"; * ListBox5.DataTextField = "Department_NAME"; * * ListBox5.DataSource = dtDepartment; * * ListBox5.DataBind(); * * ListBox11.DataValueField = "DepartmentID"; * ListBox11.DataTextField = "Department_NAME"; * ListBox11.DataSource = dtDepartment; * ListBox11.DataBind(); * * * * DataTable dtDivision = thisDataSet.Tables[3].DefaultView.ToTable(true, "DivisionID", "Division_NAME"); * * ListBox4.DataValueField = "DivisionID"; * ListBox4.DataTextField = "Division_NAME"; * * ListBox4.DataSource = dtDivision; * * ListBox4.DataBind(); * * ListBox10.DataValueField = "DivisionID"; * ListBox10.DataTextField = "Division_NAME"; * ListBox10.DataSource = dtDivision; * ListBox10.DataBind(); * * * * DataTable dtLocation = thisDataSet.Tables[1].DefaultView.ToTable(true, "LocationID", "Location_NAME"); * * ListBox3.DataValueField = "LocationID"; * ListBox3.DataTextField = "Location_NAME"; * * ListBox3.DataSource = dtLocation; * * ListBox3.DataBind(); * * ListBox9.DataValueField = "LocationID"; * ListBox9.DataTextField = "Location_NAME"; * ListBox9.DataSource = thisDataSet.Tables[1]; * ListBox9.DataBind(); * * DataTable dtGrade = thisDataSet.Tables[6].DefaultView.ToTable(true, "GrdId", "GrdName"); * lstGrade.DataValueField = "GrdId"; * lstGrade.DataTextField = "GrdName"; * lstGrade.DataSource = dtGrade; * lstGrade.DataBind(); * * lstGradeDummy.DataValueField = "GrdId"; * lstGradeDummy.DataTextField = "GrdName"; * lstGradeDummy.DataSource = dtGrade; * lstGradeDummy.DataBind(); * * DataTable dtGroup = thisDataSet.Tables[7].DefaultView.ToTable(true, "GrpId", "GrpName"); * lstGroup.DataValueField = "GrpId"; * lstGroup.DataTextField = "GrpName"; * lstGroup.DataSource = dtGroup; * lstGroup.DataBind(); * * lstGroupDummy.DataValueField = "GrpId"; * lstGroupDummy.DataTextField = "GrpName"; * lstGroupDummy.DataSource = dtGroup; * lstGroupDummy.DataBind(); * */ }
protected void Page_Load(object sender, EventArgs e) { List <string> cities = new List <string>(); cities.Add("Gilgit"); cities.Add("Chitral"); cities.Add("Dasu"); cities.Add("Dir"); cities.Add("Malakand"); cities.Add("Noshera"); cities.Add("Mansehra"); cities.Add("Hassan Abdal"); cities.Add("Peshawar"); cities.Add("Attock"); cities.Add("Kohat"); cities.Add("Islamabad"); cities.Add("Murree"); cities.Add("Rawat"); cities.Add("Balkasar"); cities.Add("Chakwal"); cities.Add("Mianwali"); cities.Add("Bhera"); cities.Add("Sargoda"); cities.Add("Pindi Bhattian"); cities.Add("Jhang"); cities.Add("Faisalabad"); cities.Add("Lahore"); cities.Add("Dina"); cities.Add("Gujranwala"); cities.Add("Multan"); cities.Add("DG Khan"); cities.Add("Bahwalpur"); cities.Add("Sukkur"); cities.Add("Rajanpur"); cities.Add("Loralai"); cities.Add("Jacobabad"); cities.Add("Quetta"); cities.Add("Khuzdar"); cities.Add("Karachi"); cities.Add("Lasbela"); cities.Add("Gwadar"); cities.Add("Awaran"); cities.Add("Turbat"); if (!IsPostBack) { CheckBoxList1.DataSource = cities; CheckBoxList2.DataSource = cities; CheckBoxList3.DataSource = cities; CheckBoxList1.DataBind(); CheckBoxList2.DataBind(); CheckBoxList3.DataBind(); } GridView1.DataSource = ExcelToDS().Tables[0]; GridView1.DataBind(); loadData(); int[,] prep2 = new int[39, 39]; int[,] D1 = resetMatrix(mygraph.vedges); for (int i = 0; i < 39; i++) { for (int j = 0; j < 39; j++) { prep2[i, j] = D1[i, j]; } } // int[,] prevD = resetMatrix2(mygraph.vedges); int [,] Dp = Floyd(D1, 39); //========================================================================// Prims obj = new Prims(); List <totaledgs> newlist = obj.primMST(mygraph.vedges); ListBox7.DataSource = newlist; ListBox8.DataSource = newlist; ListBox9.DataSource = newlist; Label2.Text = newlist[1].Weight.ToString(); ListBox7.DataTextField = "src"; ListBox7.DataBind(); ListBox8.DataTextField = "dst"; ListBox8.DataBind(); ListBox9.DataTextField = "weight"; ListBox9.DataBind(); }
private void fillEntities() { string mgrId = Session["uid"].ToString(); string levelId = Session["levelId"].ToString(); //SqlConnection con = new SqlCOConnection(m_connectons); if (conString.State == ConnectionState.Closed) { conString.Open(); } SqlCommand cmd = new SqlCommand("spFillEntities2", conString); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@levelid", levelId); SqlDataAdapter adpt = new SqlDataAdapter(cmd); DataSet thisDataSet = new DataSet(); adpt.Fill(thisDataSet); if (conString.State == ConnectionState.Open) { conString.Close(); } ListBox1.DataValueField = "EOD_EMPID"; ListBox1.DataTextField = "EmployeeName"; ListBox1.DataSource = thisDataSet.Tables[0]; ListBox1.DataBind(); ListBox7.DataValueField = "EOD_EMPID"; ListBox7.DataTextField = "EmployeeName"; ListBox7.DataSource = thisDataSet.Tables[0]; ListBox7.DataBind(); DataTable dtDivision = thisDataSet.Tables[3].DefaultView.ToTable(true, "DivisionID", "Division_NAME"); ListBox4.DataValueField = "DivisionID"; ListBox4.DataTextField = "Division_NAME"; ListBox4.DataSource = dtDivision; ListBox4.DataBind(); ListBox10.DataValueField = "DivisionID"; ListBox10.DataTextField = "Division_NAME"; ListBox10.DataSource = thisDataSet.Tables[3]; ListBox10.DataBind(); DataTable dtLocation = thisDataSet.Tables[1].DefaultView.ToTable(true, "LocationID", "Location_NAME"); ListBox3.DataValueField = "LocationID"; ListBox3.DataTextField = "Location_NAME"; ListBox3.DataSource = dtLocation; ListBox3.DataBind(); ListBox9.DataValueField = "LocationID"; ListBox9.DataTextField = "Location_NAME"; ListBox9.DataSource = thisDataSet.Tables[1]; ListBox9.DataBind(); }