Example #1
0
		private void attach_Champs(Champ entity)
		{
			this.SendPropertyChanging();
			entity.User = this;
		}
Example #2
0
		private void detach_Champs(Champ entity)
		{
			this.SendPropertyChanging();
			entity.User = null;
		}
Example #3
0
 partial void UpdateChamp(Champ instance);
Example #4
0
 partial void DeleteChamp(Champ instance);
Example #5
0
 partial void InsertChamp(Champ instance);
Example #6
0
        public ActionResult Edit(Champ champ)
        {
            mStorage.UpdateChamp(champ);

            return RedirectToAction("Index");
        }
Example #7
0
        public ActionResult Create(Champ champ)
        {
            mStorage.CreateChamp(champ);

            return RedirectToAction("Index");
        }
Example #8
0
        public int CreateChamp(Champ champ)
        {
            var db = GetDB();

            champ.CreatedBy = GetCurrentUser().Id;
            champ.Created = DateTime.Now;

            db.Champs.InsertOnSubmit(champ);
            db.SubmitChanges();

            return champ.Id;
        }
Example #9
0
        public void UpdateChamp(Champ champ)
        {
            var db = GetDB();

            var newChamp = db.Champs.Single(c => c.Id == champ.Id);
            newChamp.Name = champ.Name;

            db.SubmitChanges();
        }