Ejemplo n.º 1
0
 public ActionResult Edit(int sysreportid, Models.SysReport collection)
 {
     try
     {
         int outputId = _dataobject.Update(collection);
         return(RedirectToAction(this.ActionReturn()));
     }
     catch (Exception ex)
     {
         Services.GlobalErrors.Parse(ModelState, _dataobject.Errors, ex);
         return(PartialView(this._updateview, collection));
     }
 }
Ejemplo n.º 2
0
 public int Insert(Models.SysReport data)
 {
     try
     {
         this.Validate(data);
         this._db.SysReports.Add(data);
         this._db.SaveChanges();
         return(data.SysReportID);
     }
     catch (Exception)
     {
         throw;
     }
 }
Ejemplo n.º 3
0
        public int Update(Models.SysReport data)
        {
            try
            {
                this.Validate(data);
                this._db.Entry(data).State = System.Data.Entity.EntityState.Modified;
                this._db.SaveChanges();

                return(data.SysReportID);
            }
            catch (Exception)
            {
                throw;
            }
        }