コード例 #1
0
        public bool Insert(ShiftDayObjects ob)
        {
            var db   = new eTrainingScheduleEntities();
            var data = db.sp_tbl_S07_ShiftDay_INSERT(ob.ShiftId, ob.ShiftName, ob.Description);

            return(true);
        }
コード例 #2
0
        public ShiftDayObjects GetByShiftId(Guid ob)
        {
            var db   = new eTrainingScheduleEntities();
            var list = db.sp_tbl_S07_ShiftDay_GetByShiftId(ob);

            foreach (var item in list)
            {
                ShiftDayObjects obj = new ShiftDayObjects();
                obj.ShiftId = item.ShiftId; obj.ShiftName = item.ShiftName; obj.Description = item.Description;
                return(obj);
            }
            return(null);
        }
コード例 #3
0
        public List <ShiftDayObjects> GetAll()
        {
            List <ShiftDayObjects> lst = new List <ShiftDayObjects>();
            var db   = new eTrainingScheduleEntities();
            var list = db.sp_tbl_S07_ShiftDay_GetAll();

            foreach (var item in list)
            {
                ShiftDayObjects ob = new ShiftDayObjects();
                ob.ShiftId = item.ShiftId; ob.ShiftName = item.ShiftName; ob.Description = item.Description;
                lst.Add(ob);
            }
            return(lst);
        }
コード例 #4
0
 public ActionResult Edit(ShiftDayObjects ob, FormCollection collection)
 {
     try
     {
         // TODO: Add update logic here
         if (ob != null && new ShiftDayBCL().Update(ob))
         {
             return(RedirectToAction("Index"));
         }
     }
     catch
     {
     }
     return(View());
 }
コード例 #5
0
 public ActionResult Create(ShiftDayObjects ob, FormCollection collection)
 {
     try
     {
         // TODO: Add insert logic here
         if (ob != null)
         {
             ob.ShiftId = Guid.NewGuid();
             if (new ShiftDayBCL().Insert(ob))
             {
                 return(RedirectToAction("Index"));
             }
         }
     }
     catch
     {
     }
     return(View());
 }
コード例 #6
0
 public bool Insert(ShiftDayObjects ob)
 {
     return(new ShiftDayDao().Insert(ob));
 }
コード例 #7
0
 public bool Update(ShiftDayObjects ob)
 {
     return(new ShiftDayDao().Update(ob));
 }