예제 #1
0
 public DataSet RetrieveAllSkuData()
 {
     try
     {
         return(_skuRepository.RetrieveQuery(SqlQueries.AllSKUData));
     }
     catch (Exception e)
     {
         new LogWriter(e.Message);
         new LogWriter(e.StackTrace);
         MessageBox.Show(e.Message);
     }
     return(new DataSet());
 }
예제 #2
0
        public ConfigurationViewModel()
        {
            _skuRepository = new SkuRepository();
            REM1           = new ObservableCollection <REM1>(FetchREM1());
            REM2           = new ObservableCollection <REM2>(FetchREM2());
            var seasonalData = _skuRepository.RetrieveQuery(SqlQueries.FetchSeasonalData).Tables;

            EuroPrice     = FetcEuroLabel();
            _latestSeason = GetSeasonalDataFor(seasonalData, "TOPPAGE");
            _bottomSeason = GetSeasonalDataFor(seasonalData, "BOTTOMPAGE");
            InitializeCommands();
        }
예제 #3
0
 private string GetSeasonalDataFor(DataTableCollection seasonalData, string type)
 {
     try
     {
         var season    = new StringBuilder();
         var remresult = _skuRepository.RetrieveQuery(SqlQueries.FetchSeasonalData).Tables;
         if (remresult != null)
         {
             for (int i = 0; i < remresult[0].Rows.Count; i++)
             {
                 if (remresult[0].Rows[i][$"{type}"].ToString() == "true")
                 {
                     season.Append($"{remresult[0].Rows[i]["SEASON"]},");
                 }
             }
         }
         return(season.ToString().Remove(season.ToString().Length - 1));
     }
     catch (Exception ex)
     {
         new LogWriter().LogWrite(ex.StackTrace);
         return("");
     }
 }
예제 #4
0
 public void DeleteDescriptions()
 {
     _skuRepository.RetrieveQuery(SqlQueries.DeleteSKUs);
 }