public TotalsTableMonthView(TotalsTable model) : base(model) { _repair = new TotalLineForMonth(model.Repair); _tests = new TotalLineForMonth(model.Tests); _tunes = new TotalLineForMonth(model.Tunes); _totals = new TotalLineForMonth(model.Totals); }
private void CurrentToggle_CheckedChanged(object sender, EventArgs e) { ClearTables(); prod_data.Clear(); current_month = !current_month; // clear data and tables, reset sales and renenue count _totalSales = 0; _totalRevenue = 0; if (current_month) { _to = DateTime.Now; _from = firstDayOfThisMonth; } else { _to = firstDayOfThisMonth.AddDays(-1); _from = firstDayOfThisMonth.AddMonths(-1); } _SalesList.Clear(); _SalesList = _PHPRepo.GetSaleByDate(_from, _to); DisplaySales(); ReportTable.Update(); TotalsTable.Update(); }
public TotalsTable GenerateTotals(DateTime dateBegin, DateTime dateEnd, string workArea) { var journalRecords = _ctx.JournalRecords.Where(jr => jr.Date >= dateBegin && jr.Date < dateEnd && jr.WorkArea == workArea && jr.Operation.Work.OperationGroup != "Сопутствующие").ToList(); TotalsTable totals = GenerateTotals(journalRecords); totals.Caption = workArea; return(totals); }
public TotalsTable GenerateTotals(DateTime date, string shift, string workArea) { var journalRecords = _ctx.JournalRecords.Where(jr => jr.Date == date && jr.Shift.Value == shift && jr.WorkArea == workArea && jr.Operation.Work.OperationGroup != "Сопутствующие").ToList(); TotalsTable totals = GenerateTotals(journalRecords); totals.Caption = workArea; return(totals); }
private TotalsTable GenerateTotals(IEnumerable <JournalRecord> journalRecords) { TotalsTable totals = new TotalsTable(); totals.Tunes = CreateTotalsLine(journalRecords.Where(jr => jr.Operation.Work.OperationGroup == "Настройка")); totals.Tests = CreateTotalsLine(journalRecords.Where(jr => jr.Operation.Work.OperationGroup == "Проверка")); totals.Repair = CreateTotalsLine(journalRecords.Where(jr => jr.Operation.Work.OperationGroup == "Неисправность")); totals.Totals = CreateTotalsLine(journalRecords); return(totals); }
public static void Initialize() { PapersTable = getTable("vtPapers"); if (PapersTable != null) { PapersTable.CreateIfNotExists(); } TalliesTable = getTable("vtTallies"); if (TalliesTable != null) { TalliesTable.CreateIfNotExists(); } UsersTable = getTable("vtUsers"); if (UsersTable != null) { UsersTable.CreateIfNotExists(); } TotalsTable = getTable("vtTotals"); if (TotalsTable != null) { TotalsTable.CreateIfNotExists(); } RecordsTable = getTable("vtRecords"); if (RecordsTable != null) { RecordsTable.CreateIfNotExists(); } TagScrollsTable = getTable("vtTagScrolls"); if (TagScrollsTable != null) { TagScrollsTable.CreateIfNotExists(); } PictureContainer = getContainer("picture1"); TalliesPartitionPond = new TablePartitionPond <TallyInfo>(TalliesTable); TotalsPartitionPond = new TablePartitionPond2 <TallyInfo>(TotalsTable); TagScrollsPond = new TablePartitionPond2 <TaggedVoteInfo>(TagScrollsTable); Random = new Random(); }
protected TotalsTableVM(TotalsTable model) { Model = model; }