Ejemplo n.º 1
0
    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);
    }
Ejemplo n.º 3
0
        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();
        }
Ejemplo n.º 4
0
        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();
            }
        }
Ejemplo n.º 6
0
        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
        }