private void SummarizeKoteiShisan() { foreach (var shisanRow in db.MTKoteiShisan.Select("where syutoku_nenngappi < " + helper.Converter.DateTimeToInt(StartDate))) { if (!db.MTKaikeiKubun.IsChildOf((int)shisanRow.GetLong("kaikei_kubun", -1), KaikeiKubun)) { continue; } int kamokuKubunId = (int)shisanRow.GetLong("kamoku_kubun_id", -1); if (!meisaiTable.ContainsKey(kamokuKubunId)) { continue; } MeisaiRow meisaiRow = meisaiTable[kamokuKubunId]; var syoukyakuRows = db.GenkaSyoukyakuMeisai.Select(string.Format( "where kotei_shisan_bangou = {0} and {1} <= gensyoubi and gensyoubi <= {2} order by kaisuu", shisanRow.GetId(), helper.Converter.DateTimeToInt(StartDate), helper.Converter.DateTimeToInt(EndDate) )); if (syoukyakuRows.Count() <= 0) { continue; } models.db.Row syoukyakuRow = syoukyakuRows.Last(); meisaiRow.Col0 += syoukyakuRow.GetLong("kisyu_tyoubo_kagaku", 0); meisaiRow.Col2 += syoukyakuRow.GetLong("touki_genka_syoukyaku_kagaku", 0); meisaiRow.Col5 += syoukyakuRow.GetLong("genka_syoukyaku_ruikeigaku", 0); } }
private void InitTableAddRow(models.db.Row kamokuKubunRow) { int kamokuKubunId = kamokuKubunRow.GetId(); int parentId = (int)kamokuKubunRow.GetLong("parent_id", -1); string parentName; KoteiShisanType type; if (parentId == (int)models.constants.MTKamokuKubun.KoteiShisanKihonZaisan) { parentName = KaikeiSystemBody.Properties.Resources.CaptionKihonZaisanYuukei; type = KoteiShisanType.KihonZaisan; } else if (models.KoteiShisanFunc.IsSonotaYuukeiKoteiShisan(kamokuKubunId)) { parentName = Properties.Resources.CaptionSonotaKoteishisanYuukei; type = KoteiShisanType.SonotaYuukei; } else { parentName = Properties.Resources.CaptionSonotaKoteishisanMukei; type = KoteiShisanType.SonotaMukei; } MeisaiRow row = new MeisaiRow(kamokuKubunRow.GetStr("name"), parentName, type); meisaiTable.Add(kamokuKubunRow.GetId(), row); meisaiList.Add(row); }
public void AddMeisai(MeisaiRow row) { this.KisyuZandaka += row.KisyuZandaka; this.ToukiZouka1 += row.ToukiZouka1; this.ToukiZouka2 += row.ToukiZouka2; this.MokutekiShiyou += row.MokutekiShiyou; this.Sonota1 += row.Sonota1; this.Sonota2 += row.Sonota2; }
public void Calc(DateTime startDate, DateTime endDate, int kaikeiKubun) { StartDate = startDate; EndDate = endDate; KaikeiKubun = kaikeiKubun; SumRow = new MeisaiRow(-1, "", 0, 0, 0, 0, 0, 0, 0); InitList(); SummarizeMeisaiTable(); }
private void AddMeisaiRow(int kamokuKubunId) { models.db.Row kamokuKubunRow = db.MTKamokuKubun.GetRowById(kamokuKubunId); if (kamokuKubunRow == null) { return; } MeisaiRow row = new MeisaiRow(kamokuKubunId, kamokuKubunRow.GetStr("name", ""), 0, 0, 0, 0, 0, 0, 0); meisaiList.Add(row); }
public void Add(MeisaiRow row) { Col0 += row.Col0; Col1 += row.Col1; Col2 += row.Col2; Col3 += row.Col3; Col5 += row.Col5; Col0Kokko += row.Col0Kokko; Col1Kokko += row.Col1Kokko; Col2Kokko += row.Col2Kokko; Col3Kokko += row.Col3Kokko; Col4Kokko += row.Col4Kokko; Col5Kokko += row.Col5Kokko; Col6Kokko += row.Col6Kokko; }