Esempio n. 1
0
        protected void grdLibAttributesGroups_Sorting(object sender, GridViewSortEventArgs e)
        {
            AttributeSettingsClient oClient = new AttributeSettingsClient(ServiceConfig.AttributeSettingsDataEndPoint(), ServiceConfig.AttributeSettingsDataUri());
            List <AttributeService.AttributeSettingsData> oList = new List <AttributeSettingsData>();

            oList = oClient.GetAttributeGroupByLibraryId(ViewState["LibraryId"].ToString().ToInt());
            DataTable dtSortTable = new DataTable();

            dtSortTable = Common.ToDataTable(oList);
            if (dtSortTable != null)
            {
                DataView dvSortedView = new DataView(dtSortTable);
                dvSortedView.Sort = e.SortExpression + " " + ViewState["SortDirection"].ToString();
                grdLibAttributesGroups.DataSource = dvSortedView;
                grdLibAttributesGroups.DataBind();

                if (ViewState["SortDirection"] != null)
                {
                    if (ViewState["SortDirection"].ToString() == "DESC")
                    {
                        ViewState["SortDirection"] = "ASC";
                    }
                    else
                    {
                        ViewState["SortDirection"] = "DESC";
                    }
                }
            }
        }
Esempio n. 2
0
        private void SearchGridFill()
        {
            AttributeSettingsClient oClient = new AttributeSettingsClient(ServiceConfig.AttributeSettingsDataEndPoint(), ServiceConfig.AttributeSettingsDataUri());

            grdAttribute.DataSource = oClient.GetFullAttributeList("A", txtSearch.Text.Trim());
            grdAttribute.DataBind();
        }
Esempio n. 3
0
 private void FillLibraryAttributesGroups()
 {
     if (ViewState["LibraryId"] != null)
     {
         AttributeSettingsClient oClient = new AttributeSettingsClient(ServiceConfig.AttributeSettingsDataEndPoint(), ServiceConfig.AttributeSettingsDataUri());
         grdLibAttributesGroups.DataSource = oClient.GetAttributeGroupByLibraryId(ViewState["LibraryId"].ToString().ToInt());
         grdLibAttributesGroups.DataBind();
     }
 }