Exemple #1
0
    private void BindStateAndProperty()
    {
        BasicCodeListService basicCodeListService = new BasicCodeListService();

        this.ddlState.DataSource     = basicCodeListService.GetByType("EquState");
        this.ddlState.DataTextField  = "ItemName";
        this.ddlState.DataValueField = "ItemCode";
        this.ddlState.DataBind();
        this.ddlState.Items.Insert(0, new ListItem("", ""));
        this.ddlProperty.DataSource     = basicCodeListService.GetByType("EquProperty");
        this.ddlProperty.DataTextField  = "ItemName";
        this.ddlProperty.DataValueField = "ItemCode";
        this.ddlProperty.DataBind();
        this.ddlProperty.Items.Insert(0, new ListItem("", ""));
    }
Exemple #2
0
    private void BindStateAndProperty()
    {
        BasicCodeListService basicCodeListService = new BasicCodeListService();

        this.ddlState.DataSource = (
            from cs in basicCodeListService.GetByType("EquState")
            orderby cs.ItemCode
            select cs).ToList <BasicCodeList>();
        this.ddlState.DataTextField  = "ItemName";
        this.ddlState.DataValueField = "ItemCode";
        this.ddlState.DataBind();
        this.ddlProperty.DataSource = (
            from cs in basicCodeListService.GetByType("EquProperty")
            orderby cs.ItemCode
            select cs).ToList <BasicCodeList>();
        this.ddlProperty.DataTextField  = "ItemName";
        this.ddlProperty.DataValueField = "ItemCode";
        this.ddlProperty.DataBind();
    }
Exemple #3
0
    private void BindState()
    {
        BasicCodeListService basicCodeListService = new BasicCodeListService();

        System.Collections.Generic.List <BasicCodeList> dataSource = (
            from cs in basicCodeListService.GetByType("EquState")
            orderby cs.ItemCode
            select cs).ToList <BasicCodeList>();
        this.ddlState.DataSource     = dataSource;
        this.ddlState.DataTextField  = "ItemName";
        this.ddlState.DataValueField = "ItemCode";
        this.ddlState.DataBind();
        this.ddlState.Items.Insert(0, new ListItem("", ""));
    }