public ActionResult Edit(string Name, Models.SysColumn 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.SysColumn data) { try { this.Validate(data); this._db.SysColumns.Add(data); this._db.SaveChanges(); return(data.Name); } catch (Exception) { throw; } }
public string Update(Models.SysColumn data) { try { this.Validate(data); this._db.Entry(data).State = System.Data.Entity.EntityState.Modified; this._db.SaveChanges(); return(data.Name); } catch (Exception) { throw; } }
public string Insert(Models.SysColumn data) { try { this.Validate(data); var _data = new Models.SysColumn(); this.MapView2Table(data, _data); this._db.SysColumns.Add(_data); this._db.SaveChanges(); return(data.Name); } catch (Exception) { throw; } }
public string Update(Models.SysColumn data) { try { this.Validate(data); var _data = this.GetById2(data.Name); this.MapView2Table(data, _data); this._db.Entry(_data).State = System.Data.Entity.EntityState.Modified; this._db.SaveChanges(); return(data.Name); } catch (Exception) { throw; } }