Example #1
0
 public static Status Create(System.Data.SqlClient.SqlDataReader rdr)
 {
     return(new Status
     {
         Id = rdr.GetInt("Id"),
         Name = rdr.GetString("Name"),
         Description = rdr.GetString("Description")
     });
 }
Example #2
0
 public static ActionType Create(System.Data.SqlClient.SqlDataReader rdr)
 {
     return(new ActionType
     {
         Id = rdr.GetInt("Id"),
         Name = rdr.GetString("Name"),
         Description = rdr.GetString("Description"),
         Unit = rdr.GetString("Unit")
     });
 }
Example #3
0
        public static ScheduledTask Create(System.Data.SqlClient.SqlDataReader reader)
        {
            ScheduledTask t = new ScheduledTask();

            t.Id                  = reader.GetInt("Id");
            t.ExpenseName         = reader.GetString("ExpenseName");
            t.ExpenseCategoryName = reader.GetString("ExpenseCategoryName");
            t.BudgetId            = reader.GetInt("BudgetId");
            t.DayOfMonth          = reader.GetInt("DayOfMonth");
            t.Amount              = reader.GetDouble("Amount");
            t.Description         = reader.GetString("Description");

            if (reader.IsDBNull(reader.GetOrdinal("Completed")))
            {
                t.Completed = null;
            }
            else
            {
                t.Completed = reader.GetBoolean(reader.GetOrdinal("Completed"));
            }

            return(t);
        }