Ejemplo n.º 1
0
 public ActionResult Edit(int id, Models.AppAccountBalanceView 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.AppAccountBalanceView data)
        {
            try
            {
                this.Validate(data);

                data.CreatedBy       = GlobalVariant.GetAppUser().UserID;
                data.CreatedDateTime = DateTime.Now;

                SqlParameter[] parameters = ExConvert.Data2SqlParam(data, this._metaobject, this._paramnameoutput).ToArray();
                this._db.Database.ExecuteSqlCommand(this._storeNameI, parameters);

                return((int)parameters.GetValueSqlParam(this._paramnameoutput));
            }
            catch (Exception)
            {
                throw;
            }
        }
Ejemplo n.º 3
0
        public int Update(Models.AppAccountBalanceView data)
        {
            try
            {
                this.Validate(data);

                data.ModifiedBy       = GlobalVariant.GetAppUser().UserID;
                data.ModifiedDateTime = DateTime.Now;

                SqlParameter pOriginal  = ExConvert.ParseSqlParam(data, this._metaobject.GetMetaByColumnName(this._paramnameoutput), this._paramnameupdate);
                var          parameters = ExConvert.Data2SqlParam(data, this._metaobject, pOriginal).ToArray();
                this._db.Database.ExecuteSqlCommand(this._storeNameU, parameters);

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