private void reorderItem(ImageButton button, bool increase)
        {
            var    entities = FormData();
            object record   = DataSet.SingleOrDefault(a => new ListData(a).ID == Int32.Parse(button.CommandArgument));

            Ordering.ChangeOrder(entities, (CRM.Code.Utils.Ordering.ListOrderItem)record, increase);
            db.SubmitChanges();

            LoadView();
        }
Example #2
0
        private void reorderItem(ImageButton button, bool increase)
        {
            var entities = LoadData();

            CRM.Code.Models.Media media = db.Medias.SingleOrDefault(a => a.ID == Int32.Parse(button.CommandArgument));
            Ordering.ChangeOrder(entities, media, increase);
            db.SubmitChanges();

            LoadList();
        }
        private void reorderHeader(ImageButton button, bool increase)
        {
            int admin = 1;

            if (ViewID == -1)
            {
                admin = new AuthAdmin(db).Authorise().ID;
            }

            var entities            = DQManager.GetDataTable()._DataTableColumns.Where(d => d.AdminID == admin);
            _DataTableColumn record = DQManager.GetDataTable()._DataTableColumns.SingleOrDefault(a => a.ID == Int32.Parse(button.CommandArgument));

            Ordering.ChangeOrder(entities, record, increase);
            DQManager.db.SubmitChanges();

            LoadView();
        }