Exemplo n.º 1
0
        public void LoadKyoukaMaster()
        {
            var Kyoukas = MS_KYOUKA_CACHE.GetAll();

            KyoukaMaster.Clear();
            foreach (var Kyouka in Kyoukas)
            {
                KyoukaMaster.Add(Kyouka);
            }
        }
Exemplo n.º 2
0
        public Dictionary <string, float> Get年時数(List <DateData> dateData)
        {
            Dictionary <string, float> retDatas = new Dictionary <string, float>();

            var joinDatas = dateData.Join(MS_KYOUKA_CACHE.GetAll(), x => x.MS_KYOUKA_ID, j => j.MS_KYOUKA_ID, (x, j) => new
            {
                KYOUKA_NAME = j.KYOUKA_NAME,
                RATIO       = j.KYOUKA_RATIO
            });
            var groupDatas = joinDatas.GroupBy(x => x.KYOUKA_NAME).Select(a => new { KYOUKA_NAME = a.Key, Sum = a.Sum(x => x.RATIO) });

            foreach (var d in groupDatas)
            {
                float aa = (float)((int)(d.Sum * ROUND)) / ROUND;
                retDatas.Add(d.KYOUKA_NAME, aa);
            }
            return(retDatas);
        }
Exemplo n.º 3
0
        public double 月合計(List <DateData> dateData, int Year, int Month)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("{0}{1}", Year, Month.ToString("d2"));

            var joinDatas = dateData.Where(x => x.JIKANWARI.ToString("yyyyMM") == sb.ToString()).Join(MS_KYOUKA_CACHE.GetAll(), x => x.MS_KYOUKA_ID, j => j.MS_KYOUKA_ID, (x, j) => new
            {
                KYOUKA_NAME = j.KYOUKA_NAME,
                RATIO       = j.KYOUKA_RATIO
            });

            double aa = (double)((int)(joinDatas.Sum(x => x.RATIO) * ROUND)) / ROUND;

            return(aa);
        }
Exemplo n.º 4
0
        public Dictionary <string, float> Get月時数(List <DateData> dateData, int Year, int Month)
        {
            Dictionary <string, float> retDatas = new Dictionary <string, float>();
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("{0}{1}", Year, Month.ToString("d2"));

            var joinDatas = dateData.Where(x => x.JIKANWARI.ToString("yyyyMM") == sb.ToString()).Join(MS_KYOUKA_CACHE.GetAll(), x => x.MS_KYOUKA_ID, j => j.MS_KYOUKA_ID, (x, j) => new
            {
                KYOUKA_NAME = j.KYOUKA_NAME,
                RATIO       = j.KYOUKA_RATIO
            });
            var groupDatas = joinDatas.GroupBy(x => x.KYOUKA_NAME).Select(a => new { KYOUKA_NAME = a.Key, Sum = (float)((int)(a.Sum(x => x.RATIO) * ROUND) / ROUND) });

            foreach (var d in groupDatas)
            {
                retDatas.Add(d.KYOUKA_NAME, d.Sum);
            }
            return(retDatas);
        }