Esempio n. 1
0
 partial void DeleteLiveConditions(LiveConditions instance);
Esempio n. 2
0
 partial void UpdateLiveConditions(LiveConditions instance);
Esempio n. 3
0
        public ActionResult CreateLiveCondition(LiveConditions model)
        {
            dbDataContext db = new dbDataContext();

            db.LiveConditions.InsertOnSubmit(model);
            db.SubmitChanges();

            return RedirectToAction("LiveConditionsList");
        }
Esempio n. 4
0
 partial void InsertLiveConditions(LiveConditions instance);
Esempio n. 5
0
        public ActionResult EditLiveCondition(LiveConditions model)
        {
            dbDataContext db = new dbDataContext();
            LiveConditions lc = db.LiveConditions.SingleOrDefault(c => c.id == model.id);
            if (lc == null)
            {
                return RedirectToAction("LiveConditionsList");
            }

            lc.lc_key = model.lc_key;
            lc.lc_value = model.lc_value;

            db.SubmitChanges();
            return RedirectToAction("LiveConditionsList");
        }