Ejemplo n.º 1
0
        //modify more
        public float calcRevenuePerMonth(int customerID, DateTime startDate, DateTime endDate, bool needAll)
        {
            DateTime start;

            MySqlDataReader sales = SalesLeadDA.getInstance().sales(customerID, startDate, endDate, needAll);

            start = Convert.ToDateTime(startDate);
            float monthly = 0f;

            while (sales.Read())
            {
                monthly += sales.GetFloat(8) + sales.GetFloat(10);
            }

            return(monthly);
        }
Ejemplo n.º 2
0
 public DataView getAllRevenue()
 {
     return(SalesLeadDA.getInstance().readAllSales());
 }