コード例 #1
0
        public static int TongGioCong(DateTime batDau, DateTime ketThuc)
        {
            List <PHAN_CA> ls    = PHAN_CA.select(" where THOI_GIAN >= '" + batDau.ToShortDateString() + "' and THOI_GIAN <= '" + ketThuc.ToShortDateString() + "' ");
            int            count = 0;

            for (int i = 0; i < ls.Count; i++)
            {
                if (ls[i].CHAM_CONG == 1)
                {
                    count += CaLamViec.LayGioCong(ls[i].CA);
                }
            }
            return(count);
        }
コード例 #2
0
        //	Get Shift
        public static List <PHAN_CA> LayCaLamViec(int msnv, DateTime thoiGianBatDau
                                                  , DateTime thoiGianKetThuc)
        {
            List <PHAN_CA> tmp = new List <PHAN_CA>();;

            try
            {
                tmp = PHAN_CA.select(" where MSNV = " + msnv + " and THOI_GIAN >= '" + thoiGianBatDau.ToShortDateString() +
                                     "' and THOI_GIAN <= '" + thoiGianKetThuc.ToShortDateString() + "' ");
            }
            catch (Exception)
            {
                ;
            }
            List <PHAN_CA> result = new List <PHAN_CA>();

            for (int i = 0; i < tmp.Count; i++)
            {
                result.Add(tmp[i]);
            }
            return(result);
        }
コード例 #3
0
 //	Get Shift
 public static List <PHAN_CA> LayCaLamViec(int msnv, DateTime thoiGian)
 {
     return(PHAN_CA.select(" where MSNV = " + msnv + " and THOI_GIAN = '" + thoiGian.ToShortDateString() + "' order by MSNV, CA"));
 }