// Token: 0x0600067D RID: 1661 RVA: 0x00026C6C File Offset: 0x00024E6C
 public MaintenancePlan Get(int planID)
 {
     using (IInformationServiceProxy2 informationServiceProxy = this.SwisFactory.Create())
     {
         DataTable dataTable = informationServiceProxy.Query("\r\n                SELECT TOP 1 ID, AccountID, Name, Reason, KeepPolling, Favorite, Enabled, UnmanageDate, RemanageDate\r\n                FROM Orion.MaintenancePlan\r\n                WHERE ID = @PlanID", new Dictionary <string, object>
         {
             {
                 "PlanID",
                 planID
             }
         });
         if (dataTable != null && dataTable.Rows.Count == 1)
         {
             return(MaintenanceModePlanDAL.DataRowToPlan(dataTable.Rows.Cast <DataRow>().FirstOrDefault <DataRow>()));
         }
     }
     return(null);
 }
Ejemplo n.º 2
0
 public MaintenancePlan Get(string entityUri)
 {
     using (IInformationServiceProxy2 iinformationServiceProxy2 = this.SwisFactory.Create())
     {
         DataTable dataTable = ((IInformationServiceProxy)iinformationServiceProxy2).Query("\r\n                SELECT TOP 1 ID, AccountID, Name, Reason, KeepPolling, Favorite, Enabled, UnmanageDate, RemanageDate\r\n                FROM Orion.MaintenancePlan\r\n                WHERE Uri = @EntityUri", (IDictionary <string, object>) new Dictionary <string, object>()
         {
             {
                 "EntityUri",
                 (object)entityUri
             }
         });
         if (dataTable != null)
         {
             if (dataTable.Rows.Count == 1)
             {
                 return(MaintenanceModePlanDAL.DataRowToPlan(dataTable.Rows.Cast <DataRow>().FirstOrDefault <DataRow>()));
             }
         }
     }
     return((MaintenancePlan)null);
 }