Пример #1
0
 /// <summary>
 ///  更新一条数据
 /// </summary>
 public int Update(SqlTransaction sqltran, Entities.UpdateOrderData model)
 {
     SqlParameter[] parameters =
     {
         new SqlParameter("@RecID",          SqlDbType.Int,        4),
         new SqlParameter("@TaskID",         SqlDbType.VarChar,   20),
         new SqlParameter("@YPOrderID",      SqlDbType.Int,        4),
         new SqlParameter("@UpdateType",     SqlDbType.Int,        4),
         new SqlParameter("@UpdateErrorMsg", SqlDbType.NText),
         new SqlParameter("@CreateTime",     SqlDbType.DateTime),
         new SqlParameter("@CreateUserID",   SqlDbType.Int,        4),
         new SqlParameter("@IsUpdate",       SqlDbType.Int,        4),
         new SqlParameter("@ConsultType",    SqlDbType.Int,        4),
         new SqlParameter("@ConsultRecID",   SqlDbType.Int,        4),
         new SqlParameter("@APIType",        SqlDbType.Int,        4),
         new SqlParameter("@UpdateDateTime", SqlDbType.DateTime),
         new SqlParameter("@CustID",         SqlDbType.VarChar, 20)
     };
     parameters[0].Value  = model.RecID;
     parameters[1].Value  = model.TaskID;
     parameters[2].Value  = model.YPOrderID;
     parameters[3].Value  = model.UpdateType;
     parameters[4].Value  = model.UpdateErrorMsg;
     parameters[5].Value  = model.CreateTime;
     parameters[6].Value  = model.CreateUserID;
     parameters[7].Value  = model.IsUpdate;
     parameters[8].Value  = model.ConsultType;
     parameters[9].Value  = model.ConsultRecID;
     parameters[10].Value = model.APIType;
     parameters[11].Value = model.UpdateDateTime;
     parameters[12].Value = model.CustID;
     return(SqlHelper.ExecuteNonQuery(sqltran, CommandType.StoredProcedure, P_UPDATEORDERDATA_UPDATE, parameters));
 }
Пример #2
0
        //注册完记录日志
        private void addRegisterLog(string registerMsg)
        {
            //记录日志
            Entities.UpdateOrderData model = new Entities.UpdateOrderData();
            model.UpdateType     = 1;
            model.UpdateErrorMsg = "汽车通注册:手机号码为 " + RequestPhoneNumber + " 注册完毕。返回信息:" + registerMsg;
            model.CreateTime     = DateTime.Now;
            model.CreateUserID   = BLL.Util.GetLoginUserID();
            model.IsUpdate       = 1;
            model.APIType        = 3;//3-代表汽车通注册信息;
            if (RequestCustID != "")
            {
                model.CustID = RequestCustID;
            }
            if (RequestTaskID != "")
            {
                model.TaskID = RequestTaskID;
            }
            if (RequestYPOrderID != "")
            {
                model.YPOrderID = int.Parse(RequestYPOrderID);
            }

            BLL.UpdateOrderData.Instance.Insert(model);
        }
Пример #3
0
        private Entities.UpdateOrderData LoadSingleUpdateOrderData(DataRow row)
        {
            Entities.UpdateOrderData model = new Entities.UpdateOrderData();

            if (row["RecID"].ToString() != "")
            {
                model.RecID = int.Parse(row["RecID"].ToString());
            }

            model.TaskID = row["TaskID"].ToString();

            if (row["YPOrderID"].ToString() != "")
            {
                model.YPOrderID = int.Parse(row["YPOrderID"].ToString());
            }
            if (row["UpdateType"].ToString() != "")
            {
                model.UpdateType = int.Parse(row["UpdateType"].ToString());
            }
            model.UpdateErrorMsg = row["UpdateErrorMsg"].ToString();
            if (row["CreateTime"].ToString() != "")
            {
                model.CreateTime = DateTime.Parse(row["CreateTime"].ToString());
            }
            if (row["CreateUserID"].ToString() != "")
            {
                model.CreateUserID = int.Parse(row["CreateUserID"].ToString());
            }
            if (row["IsUpdate"].ToString() != "")
            {
                model.IsUpdate = int.Parse(row["IsUpdate"].ToString());
            }
            if (row["UpdateDateTime"].ToString() != "")
            {
                model.UpdateDateTime = DateTime.Parse(row["UpdateDateTime"].ToString());
            }
            if (row["ConsultType"].ToString() != "")
            {
                model.ConsultType = int.Parse(row["ConsultType"].ToString());
            }
            if (row["ConsultRecID"].ToString() != "")
            {
                model.ConsultRecID = int.Parse(row["ConsultRecID"].ToString());
            }
            if (row["APIType"].ToString() != "")
            {
                model.APIType = int.Parse(row["APIType"].ToString());
            }
            model.CustID = row["CustID"].ToString();
            return(model);
        }
Пример #4
0
        private void ReUpdate(long taskid)
        {
            BLL.Loger.Log4Net.Info("开始调用易湃团购回写接口");
            #region 定义变量

            string errorMsg   = "";
            int    retService = 0;
            BitAuto.ISDC.CC2012.WebService.GroupOrderHelper OrderHelper = new BitAuto.ISDC.CC2012.WebService.GroupOrderHelper();
            Entities.UpdateOrderData updateDateMode = null;
            #endregion


            #region 调用口

            Entities.QueryGroupOrder query = new Entities.QueryGroupOrder();
            query.TaskID = taskid;
            List <Entities.GroupOrder> list = BLL.GroupOrder.Instance.GetGroupOrderList(query);
            if (list != null)
            {
                foreach (Entities.GroupOrder newModel in list)
                {
                    retService = OrderHelper.SetTGCarOrderState(newModel, ref errorMsg);
                    if (retService == 1)
                    {
                        BLL.Loger.Log4Net.Info("回写团购订单成功!易湃订单ID为:" + newModel.OrderID.Value);
                    }
                    #region 插入更新无主订单数据日志表
                    updateDateMode                = new Entities.UpdateOrderData();
                    updateDateMode.TaskID         = newModel.TaskID.ToString();
                    updateDateMode.YPOrderID      = newModel.OrderID;
                    updateDateMode.UpdateType     = retService;
                    updateDateMode.IsUpdate       = retService; // 1 成功了,不用处理,-1 需要重新处理
                    updateDateMode.UpdateErrorMsg = errorMsg;
                    updateDateMode.CreateTime     = DateTime.Now;
                    updateDateMode.CreateUserID   = userId;
                    updateDateMode.APIType        = 4;//4为团购订单类型
                    BLL.UpdateOrderData.Instance.Insert(updateDateMode);
                    #endregion
                }
            }
            #endregion
        }
Пример #5
0
        /// <summary>
        ///  增加一条数据
        /// </summary>
        public int Insert(Entities.UpdateOrderData model)
        {
            SqlParameter[] parameters =
            {
                new SqlParameter("@RecID",          SqlDbType.Int,        4),
                new SqlParameter("@TaskID",         SqlDbType.VarChar,   20),
                new SqlParameter("@YPOrderID",      SqlDbType.Int,        4),
                new SqlParameter("@UpdateType",     SqlDbType.Int,        4),
                new SqlParameter("@UpdateErrorMsg", SqlDbType.NText),
                new SqlParameter("@CreateTime",     SqlDbType.DateTime),
                new SqlParameter("@CreateUserID",   SqlDbType.Int,        4),
                new SqlParameter("@IsUpdate",       SqlDbType.Int,        4),
                new SqlParameter("@ConsultType",    SqlDbType.Int,        4),
                new SqlParameter("@ConsultRecID",   SqlDbType.Int,        4),
                new SqlParameter("@APIType",        SqlDbType.Int,        4),
                new SqlParameter("@UpdateDateTime", SqlDbType.DateTime),
                new SqlParameter("@CustID",         SqlDbType.VarChar, 20)
            };
            parameters[0].Direction = ParameterDirection.Output;
            parameters[1].Value     = model.TaskID;
            parameters[2].Value     = model.YPOrderID;
            parameters[3].Value     = model.UpdateType;
            parameters[4].Value     = model.UpdateErrorMsg;
            parameters[5].Value     = model.CreateTime;
            parameters[6].Value     = model.CreateUserID;
            parameters[7].Value     = model.IsUpdate;
            parameters[8].Value     = model.ConsultType;
            parameters[9].Value     = model.ConsultRecID;
            parameters[10].Value    = model.APIType;
            parameters[11].Value    = model.UpdateDateTime;
            parameters[12].Value    = model.CustID;


            SqlHelper.ExecuteNonQuery(CONNECTIONSTRINGS, CommandType.StoredProcedure, P_UPDATEORDERDATA_INSERT, parameters);
            return((int)parameters[0].Value);
        }
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public int Update(SqlTransaction sqltran, Entities.UpdateOrderData model)
 {
     return(Dal.UpdateOrderData.Instance.Update(sqltran, model));
 }
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public int Update(Entities.UpdateOrderData model)
 {
     return(Dal.UpdateOrderData.Instance.Update(model));
 }