Exemplo n.º 1
0
        public int CompareTo(object obj)
        {
            DashboardControl dashboardControl = obj as DashboardControl;

            if (dashboardControl == null)
            {
                throw new ArgumentException("object is not a DashboardControl");
            }
            return(this.ViewOrder.CompareTo(dashboardControl.ViewOrder));
        }
 public override void Install()
 {
     bool bAdd = Null.NullBoolean;
     try
     {
         TempDashboardControl = DashboardController.GetDashboardControlByKey(Key);
         DashboardControl dashboardControl = new DashboardControl();
         if (TempDashboardControl == null)
         {
             dashboardControl.IsEnabled = true;
             bAdd = true;
         }
         else
         {
             dashboardControl.DashboardControlID = TempDashboardControl.DashboardControlID;
             dashboardControl.IsEnabled = TempDashboardControl.IsEnabled;
         }
         dashboardControl.DashboardControlKey = Key;
         dashboardControl.PackageID = Package.PackageID;
         dashboardControl.DashboardControlSrc = Src;
         dashboardControl.DashboardControlLocalResources = LocalResources;
         dashboardControl.ControllerClass = ControllerClass;
         dashboardControl.ViewOrder = ViewOrder;
         if (bAdd)
         {
             DashboardController.AddDashboardControl(dashboardControl);
         }
         else
         {
             DashboardController.UpdateDashboardControl(dashboardControl);
         }
         Completed = true;
         Log.AddInfo(dashboardControl.DashboardControlKey + " " + Util.DASHBOARD_Registered);
     }
     catch (Exception ex)
     {
         Log.AddFailure(ex);
     }
 }
 public static void UpdateDashboardControl(DashboardControl dashboardControl)
 {
     DataService.UpdateDashboardControl(dashboardControl.DashboardControlID, dashboardControl.DashboardControlKey, dashboardControl.IsEnabled, dashboardControl.DashboardControlSrc, dashboardControl.DashboardControlLocalResources, dashboardControl.ControllerClass, dashboardControl.ViewOrder);
 }
 public static void DeleteControl(DashboardControl dashboardControl)
 {
     DataService.DeleteDashboardControl(dashboardControl.DashboardControlID);
 }
 public static int AddDashboardControl(DashboardControl dashboardControl)
 {
     return DataService.AddDashboardControl(dashboardControl.PackageID, dashboardControl.DashboardControlKey, dashboardControl.IsEnabled, dashboardControl.DashboardControlSrc, dashboardControl.DashboardControlLocalResources, dashboardControl.ControllerClass, dashboardControl.ViewOrder);
 }
 public static void UpdateDashboardControl(DashboardControl dashboardControl)
 {
     DataService.UpdateDashboardControl(dashboardControl.DashboardControlID, dashboardControl.DashboardControlKey, dashboardControl.IsEnabled, dashboardControl.DashboardControlSrc, dashboardControl.DashboardControlLocalResources, dashboardControl.ControllerClass, dashboardControl.ViewOrder);
 }
 public static void DeleteControl(DashboardControl dashboardControl)
 {
     DataService.DeleteDashboardControl(dashboardControl.DashboardControlID);
 }
 public static int AddDashboardControl(DashboardControl dashboardControl)
 {
     return(DataService.AddDashboardControl(dashboardControl.PackageID, dashboardControl.DashboardControlKey, dashboardControl.IsEnabled, dashboardControl.DashboardControlSrc, dashboardControl.DashboardControlLocalResources, dashboardControl.ControllerClass, dashboardControl.ViewOrder));
 }