示例#1
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public AccountSeq GetModel(string SN)
        {
            var strSql = new StringBuilder();

            strSql.Append(@"REPOS:Ticket.AccountSeq.GetModel");
            var parameters = new List <QfParameter>();

            parameters.Add(new QfParameter("@SN", SN));

            var model = new AccountSeq();
            var ds    = Query(strSql.ToString(), parameters.ToArray());

            return(ModelConvert.ToModel <AccountSeq>(ds));
        }
示例#2
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(AccountSeq model)
        {
            var strSql = new StringBuilder();

            strSql.Append(@"REPOS:Ticket.AccountSeq.Update");
            var parameters = new List <QfParameter>();

            parameters.Add(new QfParameter("@SN", model.SN));
            parameters.Add(new QfParameter("@FreezeUncashAmount", model.FreezeUncashAmount));
            parameters.Add(new QfParameter("@RefSN", model.RefSN));
            parameters.Add(new QfParameter("@RefFreezeSN", model.RefFreezeSN));
            parameters.Add(new QfParameter("@RefCode", model.RefCode));
            parameters.Add(new QfParameter("@RefCodeType", model.RefCodeType));
            parameters.Add(new QfParameter("@OperateID", model.OperateID));
            parameters.Add(new QfParameter("@OperateTime", model.OperateTime));
            parameters.Add(new QfParameter("@Note", model.Note));
            parameters.Add(new QfParameter("@WorkDate", model.WorkDate));
            parameters.Add(new QfParameter("@AccountID", model.AccountID));
            parameters.Add(new QfParameter("@SeqFlag", model.SeqFlag));
            parameters.Add(new QfParameter("@ChangeType", model.ChangeType));
            parameters.Add(new QfParameter("@PreAmount", model.PreAmount));
            parameters.Add(new QfParameter("@Amount", model.Amount));
            parameters.Add(new QfParameter("@CashAmount", model.CashAmount));
            parameters.Add(new QfParameter("@UncashAmount", model.UncashAmount));
            parameters.Add(new QfParameter("@FreezeCashAmount", model.FreezeCashAmount));

            try
            {
                var rows = ExecuteSql(strSql.ToString(), parameters.ToArray());
                return(rows > 0);
            }
            catch (QfException ex)
            {
                throw ex;
            }
        }