Esempio n. 1
0
        public ActionResult Cancel()
        {
            CancelSubscription cxl = new CancelSubscription();
            CreditRefund       cr  = new CreditRefund();

            cr.refund();
            //cxl.cancelSub();
            return(View());
        }
Esempio n. 2
0
        protected override OpResult _Store(CreditRefund _obj)
        {
            if (_obj == null)
            {
                return(OpResult.NotifyStoreAction(OpResult.ResultStatus.ObjectIsNull, _obj, "CreditRefund object cannot be created as it is null"));
            }

            if (Exists(_obj))
            {
                ExecuteNonQuery(GetQuery_UpdateQuery(_obj));
                return(OpResult.NotifyStoreAction(OpResult.ResultStatus.Updated, _obj));
            }

            ExecuteNonQuery(GetQuery_InsertQuery(_obj));
            if (_obj.CreditRefundID == null)
            {
                _obj.CreditRefundID = DbMgr.GetLastInsertID();
            }
            _obj.FromDb = true;
            return(OpResult.NotifyStoreAction(OpResult.ResultStatus.Created, _obj));
        }
Esempio n. 3
0
 private DbUpdateStatement GetQuery_UpdateQuery(CreditRefund _obj)
 {
     return(DbMgr.CreateUpdateClause("CreditRefunds", GetFields(_obj), "CreditRefundID", _obj.CreditRefundID));
 }
Esempio n. 4
0
        private DbInsertStatement GetQuery_InsertQuery(CreditRefund _obj)
        {
            Dictionary <string, DbFieldEntry> fields = GetFields(_obj);

            return(DbMgr.CreateInsertClause("CreditRefunds", fields));
        }