public void getComboList_ID_Name(empStatus eStatus, RadComboBox cbx) { sqlStr = "EXEC proc_Get_EmpInfoIdName '" + (int)eStatus + "'"; sqlCon = new SqlConnection(cnStr); sqlCon.Open(); sqlDA = new SqlDataAdapter(sqlStr, sqlCon); dTable = new DataTable(); sqlDA.Fill(dTable); cbx.DataSource = dTable; cbx.DataTextField = "FullName"; cbx.DataValueField = "EmpId"; cbx.DataBind(); sqlCon.Close(); sqlCon.Dispose(); }
public DataTable getData_Emp_ID_Name(empStatus eStatus) { sqlStr = "EXEC proc_Get_EmpInfoAll '" + (int)eStatus + "'"; sqlCon = new SqlConnection(cnStr); sqlCon.Open(); sqlDA = new SqlDataAdapter(sqlStr, sqlCon); dTable = new DataTable(); sqlDA.Fill(dTable); sqlCon.Close(); sqlCon.Dispose(); return dTable; }