Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //For posting to SO http://stackoverflow.com/questions/3982616/deserializing-json-to-c
- public class WidgetPageItems {
- public WidgetPageItems( ) {
- CanClose = true;
- Custom = string.Empty;
- Width = 0;
- Settings = string.Empty;
- Height = 0;
- MinHeight = 0;
- ColumnOrder = 0;
- MaxHeight = 0;
- CanHide = true;
- Collapsed = false;
- CanRefresh = true;
- RefreshOnColumnChange = false;
- FileName = string.Empty;
- Title = string.Empty;
- }
- public Guid Parent { get; set; }
- public Guid ID { get; set; }
- public string Title { get; set; }
- public string FileName { get; set; }
- public string Custom { get; set; }
- public string Settings { get; set; }
- public int Width { get; set; }
- public int Height { get; set; }
- public int MinHeight { get; set; }
- public int MaxHeight { get; set; }
- public int ColumnOrder { get; set; }
- public bool CanHide { get; set; }
- public bool CanClose { get; set; }
- public bool Collapsed { get; set; }
- public bool CanRefresh { get; set; }
- public bool RefreshOnColumnChange { get; set; }
- }
- // yes I'm sure there's a linq method that works better than this, but it works, doesn't it?
- [WebMethod]
- public void UpdatePositions(List<WidgetPageItems> Items) {
- int counter = 0;
- foreach ( WidgetPageItems w in Items ) {
- w.ColumnOrder = counter;
- counter++;
- }
- _bll.UpdateWidget( Items );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement