Пример #1
0
        protected void rcblElements_ItemDataBound(object sender, ButtonListEventArgs e)
        {
            ButtonListItem item = (ButtonListItem)e.Item;

            int    element_id  = Convert.ToInt32(item.Value);
            string report_type = db.ElementReportRefs.FirstOrDefault(p => p.element_id == element_id).report_type_cd;

            switch (report_type)
            {
            case "SDESC":
                break;

            case "MANU":
                break;

            case "SANAL":
                break;
            }
        }
 /// <summary>
 /// Populate values from the base palette.
 /// </summary>
 /// <param name="common">Reference to common settings.</param>
 public void PopulateFromBase(KryptonPaletteCommon common)
 {
     // Populate only the designated styles
     common.StateCommon.BackStyle    = PaletteBackStyle.ButtonStandalone;
     common.StateCommon.BorderStyle  = PaletteBorderStyle.ButtonStandalone;
     common.StateCommon.ContentStyle = PaletteContentStyle.ButtonStandalone;
     ButtonStandalone.PopulateFromBase();
     common.StateCommon.BackStyle    = PaletteBackStyle.ButtonAlternate;
     common.StateCommon.BorderStyle  = PaletteBorderStyle.ButtonAlternate;
     common.StateCommon.ContentStyle = PaletteContentStyle.ButtonAlternate;
     ButtonAlternate.PopulateFromBase();
     common.StateCommon.BackStyle    = PaletteBackStyle.ButtonLowProfile;
     common.StateCommon.BorderStyle  = PaletteBorderStyle.ButtonLowProfile;
     common.StateCommon.ContentStyle = PaletteContentStyle.ButtonLowProfile;
     ButtonLowProfile.PopulateFromBase();
     common.StateCommon.BackStyle    = PaletteBackStyle.ButtonButtonSpec;
     common.StateCommon.BorderStyle  = PaletteBorderStyle.ButtonButtonSpec;
     common.StateCommon.ContentStyle = PaletteContentStyle.ButtonButtonSpec;
     ButtonButtonSpec.PopulateFromBase();
     common.StateCommon.BackStyle    = PaletteBackStyle.ButtonBreadCrumb;
     common.StateCommon.BorderStyle  = PaletteBorderStyle.ButtonBreadCrumb;
     common.StateCommon.ContentStyle = PaletteContentStyle.ButtonBreadCrumb;
     ButtonBreadCrumb.PopulateFromBase();
     common.StateCommon.BackStyle    = PaletteBackStyle.ButtonCalendarDay;
     common.StateCommon.BorderStyle  = PaletteBorderStyle.ButtonCalendarDay;
     common.StateCommon.ContentStyle = PaletteContentStyle.ButtonCalendarDay;
     ButtonCalendarDay.PopulateFromBase();
     common.StateCommon.BackStyle    = PaletteBackStyle.ButtonNavigatorStack;
     common.StateCommon.BorderStyle  = PaletteBorderStyle.ButtonNavigatorStack;
     common.StateCommon.ContentStyle = PaletteContentStyle.ButtonNavigatorStack;
     ButtonNavigatorStack.PopulateFromBase();
     common.StateCommon.BackStyle    = PaletteBackStyle.ButtonNavigatorOverflow;
     common.StateCommon.BorderStyle  = PaletteBorderStyle.ButtonNavigatorOverflow;
     common.StateCommon.ContentStyle = PaletteContentStyle.ButtonNavigatorOverflow;
     ButtonNavigatorOverflow.PopulateFromBase();
     common.StateCommon.BackStyle    = PaletteBackStyle.ButtonNavigatorMini;
     common.StateCommon.BorderStyle  = PaletteBorderStyle.ButtonNavigatorMini;
     common.StateCommon.ContentStyle = PaletteContentStyle.ButtonNavigatorMini;
     ButtonNavigatorMini.PopulateFromBase();
     common.StateCommon.BackStyle    = PaletteBackStyle.ButtonInputControl;
     common.StateCommon.BorderStyle  = PaletteBorderStyle.ButtonInputControl;
     common.StateCommon.ContentStyle = PaletteContentStyle.ButtonInputControl;
     ButtonInputControl.PopulateFromBase();
     common.StateCommon.BackStyle    = PaletteBackStyle.ButtonListItem;
     common.StateCommon.BorderStyle  = PaletteBorderStyle.ButtonListItem;
     common.StateCommon.ContentStyle = PaletteContentStyle.ButtonListItem;
     ButtonListItem.PopulateFromBase();
     common.StateCommon.BackStyle    = PaletteBackStyle.ButtonForm;
     common.StateCommon.BorderStyle  = PaletteBorderStyle.ButtonForm;
     common.StateCommon.ContentStyle = PaletteContentStyle.ButtonForm;
     ButtonForm.PopulateFromBase();
     common.StateCommon.BackStyle    = PaletteBackStyle.ButtonFormClose;
     common.StateCommon.BorderStyle  = PaletteBorderStyle.ButtonFormClose;
     common.StateCommon.ContentStyle = PaletteContentStyle.ButtonFormClose;
     ButtonFormClose.PopulateFromBase();
     common.StateCommon.BackStyle    = PaletteBackStyle.ButtonCommand;
     common.StateCommon.BorderStyle  = PaletteBorderStyle.ButtonCommand;
     common.StateCommon.ContentStyle = PaletteContentStyle.ButtonCommand;
     ButtonCommand.PopulateFromBase();
     common.StateCommon.BackStyle    = PaletteBackStyle.ButtonCluster;
     common.StateCommon.BorderStyle  = PaletteBorderStyle.ButtonCluster;
     common.StateCommon.ContentStyle = PaletteContentStyle.ButtonCluster;
     ButtonCluster.PopulateFromBase();
     common.StateCommon.BackStyle    = PaletteBackStyle.ButtonGallery;
     common.StateCommon.BorderStyle  = PaletteBorderStyle.ButtonGallery;
     common.StateCommon.ContentStyle = PaletteContentStyle.ButtonGallery;
     ButtonGallery.PopulateFromBase();
 }