public void Add(string orderId, string remark,string actInfo, string userId)
 {
     OrderChangeLogModel model = new OrderChangeLogModel();
     model.OrderId = orderId;
     model.Remark = remark;
     model.Operator = userId;
     model.ActInfo = actInfo;
     dal.Add(model);
 }
Exemplo n.º 2
0
        public void Add(string orderId, string remark, string actInfo, string userId)
        {
            OrderChangeLogModel model = new OrderChangeLogModel();

            model.OrderId  = orderId;
            model.Remark   = remark;
            model.Operator = userId;
            model.ActInfo  = actInfo;
            dal.Add(model);
        }
 /// <summary>
 /// 对象实体绑定数据
 /// </summary>
 private OrderChangeLogModel ReaderBind(IDataReader dataReader)
 {
     OrderChangeLogModel model=new OrderChangeLogModel();
     object ojb;
     model.OrderId=dataReader["OrderId"].ToString();
     ojb = dataReader["ChangeTime"];
     if(ojb != null && ojb != DBNull.Value)
     {
         model.ChangeTime=(DateTime)ojb;
     }
     model.Remark=dataReader["Remark"].ToString();
     model.Operator=dataReader["Operator"].ToString();
     model.ActInfo = dataReader["actinfo"].ToString();
     return model;
 }
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public void Add(OrderChangeLogModel model)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("insert into spOrderChangeLog(");
            strSql.Append("OrderId,ChangeTime,Remark,Operator,actinfo)");
            strSql.Append(" values (@OrderId,getdate(),@Remark,@Operator,@actinfo)");
            Database db = DatabaseFactory.CreateDatabase();
            DbCommand dbCommand = db.GetSqlStringCommand(strSql.ToString());
            db.AddInParameter(dbCommand, "OrderId", DbType.AnsiString, model.OrderId);
            db.AddInParameter(dbCommand, "Remark", DbType.AnsiString, model.Remark);
            db.AddInParameter(dbCommand, "Operator", DbType.AnsiString, model.Operator);
            db.AddInParameter(dbCommand, "actinfo", DbType.AnsiString, model.ActInfo);

            db.ExecuteNonQuery(dbCommand);
        }
Exemplo n.º 5
0
        /// <summary>
        /// 对象实体绑定数据
        /// </summary>
        private OrderChangeLogModel ReaderBind(IDataReader dataReader)
        {
            OrderChangeLogModel model = new OrderChangeLogModel();
            object ojb;

            model.OrderId = dataReader["OrderId"].ToString();
            ojb           = dataReader["ChangeTime"];
            if (ojb != null && ojb != DBNull.Value)
            {
                model.ChangeTime = (DateTime)ojb;
            }
            model.Remark   = dataReader["Remark"].ToString();
            model.Operator = dataReader["Operator"].ToString();
            model.ActInfo  = dataReader["actinfo"].ToString();
            return(model);
        }
Exemplo n.º 6
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public void Add(OrderChangeLogModel model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into spOrderChangeLog(");
            strSql.Append("OrderId,ChangeTime,Remark,Operator,actinfo)");
            strSql.Append(" values (@OrderId,getdate(),@Remark,@Operator,@actinfo)");
            Database  db        = DatabaseFactory.CreateDatabase();
            DbCommand dbCommand = db.GetSqlStringCommand(strSql.ToString());

            db.AddInParameter(dbCommand, "OrderId", DbType.AnsiString, model.OrderId);
            db.AddInParameter(dbCommand, "Remark", DbType.AnsiString, model.Remark);
            db.AddInParameter(dbCommand, "Operator", DbType.AnsiString, model.Operator);
            db.AddInParameter(dbCommand, "actinfo", DbType.AnsiString, model.ActInfo);

            db.ExecuteNonQuery(dbCommand);
        }
Exemplo n.º 7
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(OrderChangeLogModel model)
 {
     dal.Add(model);
 }
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(OrderChangeLogModel model)
 {
     dal.Add(model);
 }