protected void Page_Load(object sender, EventArgs e) { DataAccessServiceClient client = new DataAccessServiceClient(); RadGrid1.DataSource = client.GetEmployeeData(9).Employees; RadGrid1.DataBind(); }
private List <Employee> GetDataTable() { DataAccessServiceClient client = new DataAccessServiceClient(); EmployeeDataContract edc = client.GetEmployeeData(0); return(edc.Employees); }
protected void SelectedNewIndex(object sender, EventArgs e) { DataAccessServiceClient cl = new DataAccessServiceClient(); EmployeeDataContract edc = cl.GetEmployeeData(0); DropDownListOutput.DataTextField = "Job"; DropDownListOutput.DataValueField = "Id"; DropDownListOutput.DataSource = edc.Employees.ToList(); DropDownListOutput.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { DataAccessServiceClient cl = new DataAccessServiceClient(); EmployeeDataContract edc = cl.GetEmployeeData(0); DropDownListSql.DataTextField = "Name"; DropDownListSql.DataValueField = "Id"; DropDownListSql.DataSource = edc.Employees.ToList(); DropDownListSql.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { DataAccessServiceClient client = new DataAccessServiceClient(); EmployeeDataContract edc = client.GetEmployeeData(0); if (!IsPostBack) { GridView1.DataSource = edc.Employees.ToList(); GridView1.DataBind(); UG.Focus(); } }
private void InitialiseDropDownlist(List <dynamic> temp) { #region From XML CountriesDropDownlist.DataSource = (temp).ToList(); CountriesDropDownlist.DataTextField = "Text"; CountriesDropDownlist.DataValueField = "Value"; CountriesDropDownlist.DataBind(); #endregion #region From SQL DataAccessServiceClient cl = new DataAccessServiceClient(); EmployeeDataContract edc = cl.GetEmployeeData(0); DropDownListSql.DataTextField = "Name"; DropDownListSql.DataValueField = "Id"; DropDownListSql.DataSource = edc.Employees.ToList(); DropDownListSql.DataBind(); #endregion }