Exemplo n.º 1
0
        public bool Insert(WeekdaysObjects ob)
        {
            var db   = new eTrainingScheduleEntities();
            var data = db.sp_tbl_S07_Weekdays_INSERT(ob.WeId, ob.WeName, ob.Description);

            return(true);
        }
Exemplo n.º 2
0
        public WeekdaysObjects GetByWeId(WeekdaysObjects ob)
        {
            var db   = new eTrainingScheduleEntities();
            var list = db.sp_tbl_S07_Weekdays_GetByWeId(ob.WeId);

            foreach (var item in list)
            {
                WeekdaysObjects obj = new WeekdaysObjects();
                obj.WeId = item.WeId; obj.WeName = item.WeName; obj.Description = item.Description;
                return(obj);
            }
            return(null);
        }
Exemplo n.º 3
0
        public List <WeekdaysObjects> GetAll()
        {
            List <WeekdaysObjects> lst = new List <WeekdaysObjects>();
            var db   = new eTrainingScheduleEntities();
            var list = db.sp_tbl_S07_Weekdays_GetAll();

            foreach (var item in list)
            {
                WeekdaysObjects ob = new WeekdaysObjects();
                ob.WeId = item.WeId; ob.WeName = item.WeName; ob.Description = item.Description;
                lst.Add(ob);
            }
            return(lst);
        }
Exemplo n.º 4
0
 public ActionResult Edit(WeekdaysObjects ob, FormCollection collection)
 {
     try
     {
         // TODO: Add update logic here
         if (ob != null && new WeekdaysBCL().Update(ob))
         {
             return(RedirectToAction("Index"));
         }
     }
     catch
     {
     }
     return(View());
 }
Exemplo n.º 5
0
 public ActionResult Create(WeekdaysObjects ob, FormCollection collection)
 {
     try
     {
         // TODO: Add insert logic here
         if (ob != null)
         {
             ob.WeId = Guid.NewGuid();
             if (new WeekdaysBCL().Insert(ob))
             {
                 return(RedirectToAction("Index"));
             }
         }
     }
     catch
     {
     }
     return(View());
 }
Exemplo n.º 6
0
 public bool Insert(WeekdaysObjects ob)
 {
     return(new WeekdaysDao().Insert(ob));
 }
Exemplo n.º 7
0
 public bool Update(WeekdaysObjects ob)
 {
     return(new WeekdaysDao().Update(ob));
 }
Exemplo n.º 8
0
 public WeekdaysObjects GetByWeId(WeekdaysObjects ob)
 {
     return(new WeekdaysDao().GetByWeId(ob));
 }