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