Beispiel #1
0
 public StatPolar GetStatPolar(int year, int month)
 {
     try
     {
         StatPolar list = new StatPolar()
         {
             year  = year,
             month = month
         };
         string sql = "SELECT " +
                      "count(distinct a.ordernumber) " +
                      "FROM s_order as a " +
                      "join s_order_details as b on a.id = b.orderID " +
                      "where b.articleID != 0 " +
                      "and a.id not in (" +
                      "SELECT distinct a.id FROM s_order as a " +
                      "join s_order_details as b on a.id = b.orderID " +
                      "join magnalister_orders as c on a.id = c.orders_id " +
                      "where b.articleID != 0 " + "and year(a.ordertime) = " + year.ToString() + " and month(a.ordertime) = " + month.ToString() +
                      ")" + " and year(a.ordertime) = " + year.ToString() + " and month(a.ordertime) = " + month.ToString() +
                      " group by year(a.ordertime),month(a.ordertime);";
         MySqlCommand    command = new MySqlCommand(sql, connection);
         MySqlDataReader reader  = command.ExecuteReader();
         while (reader.Read())
         {
             list.shopware = int.Parse(reader[0].ToString());
         }
         reader.Close();
         CloseConnection();
         return(list);
     }
     catch (Exception ex)
     {
         Console.WriteLine("Database: Unable to retrieve records () from the database.");
         CloseConnection();
         return(null);
     }
 }
Beispiel #2
0
 private static StatPolarItemViewModel Convert(StatPolar r)
 {
     return(new StatPolarItemViewModel(r));
 }
Beispiel #3
0
 public StatPolarItemViewModel(StatPolar model)
 {
     _item = model;
 }
Beispiel #4
0
 public StatPolarItemViewModel()
 {
     _item = new StatPolar();
 }