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); }
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); }
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); }
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()); }
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()); }
public bool Insert(ShiftDayObjects ob) { return(new ShiftDayDao().Insert(ob)); }
public bool Update(ShiftDayObjects ob) { return(new ShiftDayDao().Update(ob)); }