Example #1
0
        public string LoadRoutine(int RoutineID)
        {
            AgendaRoutineModel routine = new AgendaRoutineModel();

            try
            {
                routine.Load(RoutineID);
            }
            catch (Exception e)
            {
                new EventLogger.EventLogger("Routine Management", "Application").WriteException(e);
            }

            return new JavaScriptSerializer().Serialize(Json(routine).Data);
        }
Example #2
0
        public static List<AgendaRoutineModel> GetRoutineList()
        {
            List<AgendaRoutineModel> rl = new List<AgendaRoutineModel>();

            using (SqlServer database = new SqlServer(WebConfigurationManager.ConnectionStrings["DefaultConnection"].ToString()))
            {
                using(DataTable dt = database.GetDataTable("dbo.RoutineListGet", new List<SqlParameter>()))
                {

                    AgendaRoutineModel r;

                    foreach(DataRow row in dt.Rows)
                    {
                        r = new AgendaRoutineModel();
                        r.ID = int.Parse(row["ID"].ToString());
                        r.Name = row["Name"].ToString();
                        r.Description = row["Description"].ToString();
                        r.Area = row["AreaName"].ToString();
                        r.CreatedBy = row["UserName"].ToString();
                        r.CreatedOn = row["CreatedOn"].ToString();

                        rl.Add(r);
                    }
                }
            }

            return rl;
        }
Example #3
0
 public void SaveScheduledRoutine(AgendaRoutineModel Routine, int ScheduleID)
 {
     try
     {
         Routine.SaveScheduledRoutine(ScheduleID);
     }
     catch (Exception e)
     {
         new EventLogger.EventLogger("Routine Management", "Application").WriteException(e);
     }
 }
Example #4
0
 public void SaveRoutine(AgendaRoutineModel Routine)
 {
     try
     {
         Routine.Save();
     }
     catch (Exception e)
     {
         new EventLogger.EventLogger("Routine Management", "Application").WriteException(e);
     }
 }