Example #1
0
 public static int GetWeekNumber(DateTime ReportDate, int WeekStartDay)
 {
     using (var db = new ccEntities())
     {
         var queryText = "SELECT ccModel.Store.GetWeekNumber(@ReportDate, @WeekStartDay) FROM {1}";
         var result    = db.CreateQuery <int>(queryText
                                              , new ObjectParameter("ReportDate", ReportDate)
                                              , new ObjectParameter("WeekStartDay", WeekStartDay));
         return(result.First());
     }
 }
Example #2
0
 public static decimal?GovHcCapLeaveDate(int clientId, DateTime?checkPeriodStart, DateTime?checkPeriodEnd)
 {
     using (var db = new ccEntities())
     {
         var queryText = "SELECT ccModel.Store.GovHcCapLeaveDate(@clientId, @checkPeriodStart, @checkPeriodEnd) FROM {1}";
         var result    = db.CreateQuery <decimal?>(queryText
                                                   , new ObjectParameter("clientId", clientId)
                                                   , new ObjectParameter("checkPeriodStart", checkPeriodStart)
                                                   , new ObjectParameter("checkPeriodEnd", checkPeriodEnd));
         return(result.First());
     }
 }
Example #3
0
        public static int CfsLevelForGivenDate(int clientId, DateTime?givenDate)
        {
            using (var db = new ccEntities())
            {
                var queryText = "SELECT ccModel.Store.CfsLevelForGivenDate(@clientId, @givenDate) FROM {1}";
                var result    = db.CreateQuery <int>(queryText
                                                     , new ObjectParameter("clientId", clientId)
                                                     , new ObjectParameter("givenDate", givenDate));

                return(result.First());
            }
        }