public ActionResult Edit(string TableName, Models.SysTable collection) { try { string outputId = _dataobject.Update(collection); return(RedirectToAction(this.ActionReturn())); } catch (Exception ex) { Services.GlobalErrors.Parse(ModelState, _dataobject.Errors, ex); return(PartialView(this._updateview, collection)); } }
public string Insert(Models.SysTable data) { try { this.Validate(data); this._db.SysTables.Add(data); this._db.SaveChanges(); return(data.TableName); } catch (Exception) { throw; } }
public string Update(Models.SysTable data) { try { this.Validate(data); this._db.Entry(data).State = System.Data.Entity.EntityState.Modified; this._db.SaveChanges(); return(data.TableName); } catch (Exception) { throw; } }