Exemplo n.º 1
0
 private static bool GetUpdateDetailsList(string detailsFilePath)
 {
     try
     {
         var dbReader = new DbSqLiteHelper(detailsFilePath);
         dbReader.ConnectionInit();
         var dt = dbReader.ExecuteDataTable(SQL_GET_UPDATE_DETAILS);
         if (dt == null || dt.Rows.Count == 0)
         {
             return(false);
         }
         for (int index = 0; index < dt.Rows.Count; index++)
         {
             var details = new UpdateDetails();
             details.Type         = (TargetType)dt.Rows[index][0];
             details.UpdateSource = (string)dt.Rows[index][1];
             details.UpdateTarget = (string)dt.Rows[index][2];
             _updateDetailsList.Add(details);
         }
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
Exemplo n.º 2
0
 private static bool GetUpdateDetailsList(string detailsFilePath)
 {
     try
     {
         var dbReader = new DbSqLiteHelper(detailsFilePath);
         dbReader.ConnectionInit();
         var dt = dbReader.ExecuteDataTable(SQL_GET_UPDATE_DETAILS);
         if (dt == null || dt.Rows.Count == 0)
         {
             return false;
         }
         for (int index = 0; index < dt.Rows.Count; index++)
         {
             var details = new UpdateDetails();
             details.Type = (TargetType)dt.Rows[index][0];
             details.UpdateSource = (string)dt.Rows[index][1];
             details.UpdateTarget = (string)dt.Rows[index][2];
             _updateDetailsList.Add(details);
         }
         return true;
     }
     catch (Exception ex)
     {
         return false;
     }
 }