private DataTable GetShukeiYmdYouto(DataTable rirekiTable)
        {
            DataTable dtShukei = new DataSetKakeibo.ShukeiYmdYoutoDataTable();

            SortedDictionary <(string ymd, string youto), (int shunyu, int shishutsu)> dic = new SortedDictionary <(string ymd, string youto), (int, int)>();

            foreach (DataRow row in rirekiTable.Rows)
            {
                string ymd       = Convert.ToDateTime(row["hiduke"]).ToString("yyyy/MM/dd");
                string youto     = row["naiyou"].ToString();
                int    shunyu    = row["nyukin"].GetInt();
                int    shishutsu = row["shukkin"].GetInt();

                if (dic.ContainsKey((ymd, youto)))
                {
                    shunyu            = dic[(ymd, youto)].shunyu + shunyu;
                    shishutsu         = dic[(ymd, youto)].shishutsu + shishutsu;
Example #2
0
        private DataTable GetShukeiYmdYouto(DataTable rirekiTable)
        {
            DataTable dtShukei = new DataSetKakeibo.ShukeiYmdYoutoDataTable();

            SortedDictionary <(string ymd, string youto), (int shunyu, int shishutsu)> dic = new SortedDictionary <(string ymd, string youto), (int, int)>();

            foreach (DataRow row in rirekiTable.Rows)
            {
                string ymd       = row[EnumRireki.Ymd.GetInt()].ToString();
                string youto     = row[EnumRireki.Youto.GetInt()].ToString();
                int    shunyu    = row[EnumRireki.Shunyu.GetInt()].GetInt();
                int    shishutsu = row[EnumRireki.Shishutsu.GetInt()].GetInt();

                if (dic.ContainsKey((ymd, youto)))
                {
                    shunyu            = dic[(ymd, youto)].shunyu + shunyu;
                    shishutsu         = dic[(ymd, youto)].shishutsu + shishutsu;