示例#1
0
        /// <summary>
        /// Function to get all columns to display to select & unselect for grid.
        /// </summary>
        /// <param name="PageName"></param>
        /// <returns></returns>
        public static disChooseColumns GetAllColumns(string PageName, bool IsRestoreDefault = false)
        {
            disChooseColumns obj = new disChooseColumns();

            var set = new SetCollection();

            set.AddSet <Columns>("LstColumnName");
            set.AddSet <Columns>("LstDisplayColumnName");

            var parameters = new Parameter[]
            {
                new Parameter("@PageName", PageName),
                new Parameter("@IsRestoreDefault", IsRestoreDefault)
            };

            SqlSerializer.Default.DeserializeMultiSets(set, StoredProcedureNames.GetAllColumns, parameters, storedProcedure: true);
            obj.LstColumnName        = set.GetSet <Columns>("LstColumnName") ?? new List <Columns>();
            obj.LstDisplayColumnName = set.GetSet <Columns>("LstDisplayColumnName") ?? new List <Columns>();

            return(obj);
        }