Exemplo n.º 1
0
 protected override void BaseListForm_Load(object sender, EventArgs e)
 {
     base.BaseListForm_Load(sender, e);
     RefreshHelper = new GridCointrolState(new[]
         {
             new GridCointrolState.ViewDescriptor("", "ID"),
             new GridCointrolState.ViewDescriptor("Costs", "CostID")
         });
 }
Exemplo n.º 2
0
 protected override void BaseListForm_Load(object sender, EventArgs e)
 {
     base.BaseListForm_Load(sender, e);
     foreach (var item in Factory.Manager<PaymentDataSettingsManager>().GetByOffice(CurrentInfo.OfficeID))
     {
         var column = viewActs.Columns[item.PaymentFieldID.ToString()];
         if (!item.Show)
         {
             column.VisibleIndex = -1;
         }
         else
         {
             if (column.VisibleIndex == -1)
             {
                 column.VisibleIndex =
                     viewActs.Columns.Cast<GridColumn>().Count(c => c.VisibleIndex != -1);
             }
         }
     }
     menuGrid.Items.Add(menuItemAddNote);
     menuGrid.Items.Add(menuItemSteps);
     //menuGrid.Items.Add(itemAddStatus);
     itemAddStatus.Click += itemAddStatus_Click;
     RefreshHelper = new GridCointrolState(new[]
         {
             new GridCointrolState.ViewDescriptor("", "ID"),
             new GridCointrolState.ViewDescriptor("Steps", "ID"),
             new GridCointrolState.ViewDescriptor("Documents", "ID"),
             new GridCointrolState.ViewDescriptor("StatusHistory", "ID"),
             new GridCointrolState.ViewDescriptor("Notes", "ID")
         });
     viewActs.OptionsMenu.EnableColumnMenu = CurrentInfo.Permission == ePermissions.Admin;
     viewActs.OptionsMenu.EnableFooterMenu = CurrentInfo.Permission == ePermissions.Admin;
     viewActs.OptionsMenu.EnableGroupPanelMenu = CurrentInfo.Permission == ePermissions.Admin;
     viewActs.OptionsCustomization.AllowColumnMoving = CurrentInfo.Permission == ePermissions.Admin;
     viewActs.OptionsCustomization.AllowGroup = CurrentInfo.Permission == ePermissions.Admin;
 }
Exemplo n.º 3
0
 protected ViewState(GridCointrolState gridState, ViewDescriptor descriptor)
 {
     this.gridState = gridState;
     this.descriptor = descriptor;
     this.parent = null;
 }
Exemplo n.º 4
0
 public static ViewState Create(GridCointrolState gridState, GridView view)
 {
     if (!gridState.viewDescriptors.ContainsKey(view.LevelName)) return null;
     ViewState state = new ViewState(gridState, (ViewDescriptor)gridState.viewDescriptors[view.LevelName]);
     return state;
 }
Exemplo n.º 5
0
 protected ViewState(ViewState parent, ViewDescriptor descriptor)
 {
     this.parent = parent;
     this.gridState = parent.gridState;
     this.descriptor = descriptor;
 }