Example #1
0
    // Private Helper Methods
    private static CYCLES OpenConnection(IDbConnection connection, string library)
    {
        var dOOdad = new CYCLES(connection);

        dOOdad.SchemaGlobal = library + ".";
        return(dOOdad);
    }
Example #2
0
 protected CycleModel ConvertCycleToCycleModel(CYCLES CYCLE)
 {
     return(new CycleModel
     {
         CycleId = CYCLE.CYCLE_ID,
         StartDate = CYCLE.START_DATE.Value,
         EndDate = CYCLE.END_DATE.Value
     });
 }
Example #3
0
        public long CreateCycle(DateTime startDate, DateTime endDate)
        {
            try
            {
                using (var context = new GritCoinEntities())
                {
                    var cycle = new CYCLES
                    {
                        CYCLE_ID   = GetSequenceNextValue(context, "GRITCOIN.CYCLES_SEQ"),
                        START_DATE = startDate,
                        END_DATE   = endDate
                    };

                    context.AddToCYCLES(cycle);
                    context.SaveChanges();
                    return(cycle.CYCLE_ID);
                }
            }
            catch { throw; }
        }
Example #4
0
 public CyclesLookup(IDbConnection connection, string library)
 {
     _dOOdad = OpenConnection(connection, library);
 }