Exemple #1
0
        public DataTable getProductBoughtQuant(DateTime date, PeriodOfTime mode, string barcode)
        {
            DataTable dt = negocio.Supplier_getProductBoughtQuant(ID, date, (int)mode, barcode);

            if (dt.Columns["mes"] != null)
            {
                dt.Columns.Remove(dt.Columns["mes"]);
                dt.AcceptChanges();
            }
            return(dt);
        }
Exemple #2
0
        public DataTable getPurchaseStatistics(DateTime date, PeriodOfTime mode)
        {
            DataTable dt = negocio.Supplier_getPurchaseStatistics(ID, date, mode);

            if (dt.Columns["mes"] != null)
            {
                dt.Columns.Remove(dt.Columns["mes"]);
                dt.AcceptChanges();
            }
            return(dt);
        }
Exemple #3
0
        public Task <List <Training> > GetTreningListForMonth(PeriodOfTime periodOfTime, Guid userID)
        {
            var startOfThePeriod = new DateTime(
                periodOfTime.StartOfThePeriod.Year,
                periodOfTime.StartOfThePeriod.Month,
                periodOfTime.StartOfThePeriod.Day,
                0, 0, 0);
            var endOfThePeriod = new DateTime(
                periodOfTime.EndOfThePeriod.Year,
                periodOfTime.EndOfThePeriod.Month,
                periodOfTime.EndOfThePeriod.Day,
                23, 59, 59);

            return(ApplicationContext.Trainings
                   .AsNoTracking()
                   .Where(t => t.TrainingTime >= startOfThePeriod && t.TrainingTime <= endOfThePeriod && t.UserId == userID)
                   .ToListAsync());
        }
 public List <DateTime> GetDateListByPeriodOfTime(PeriodOfTime periodOfTime)
 {
     return(Enumerable.Range(0, 1 + periodOfTime.EndOfThePeriod.Subtract(periodOfTime.StartOfThePeriod).Days)
            .Select(offset => periodOfTime.StartOfThePeriod.AddDays(offset).Date)
            .ToList());
 }
Exemple #5
0
 public DataTable getWorstSellers(DateTime date, PeriodOfTime mode)
 {
     return(negocio.Supplier_getWorstSellers(ID, date, (int)mode));
 }