Esempio n. 1
0
        /// <summary>
        /// 新增特殊结算价格数据
        /// </summary>
        /// <param name="data"></param>
        /// <param name="nOpStaffId"></param>
        /// <param name="strOpStaffName"></param>
        /// <param name="strErrText"></param>
        /// <returns></returns>
        public bool InsertDeliverBillCustomerTransportPrice(DeliverBillCustomerTransportPrice data, long nOpStaffId, string strOpStaffName, out string strErrText)
        {
            //创建存储过程参数
            SqlParameter[] Params =
            {
                MakeParam(DELIVERBILLID_PARAM,    SqlDbType.BigInt,     8, ParameterDirection.Input, (object)data.DeliverBillId),
                MakeParam(TRANSPORTPRICE_PARAM,   SqlDbType.Decimal,   13, ParameterDirection.Input, (object)data.TransportPrice),
                MakeParam(TRANSPORTCHARGES_PARAM, SqlDbType.Decimal,   13, ParameterDirection.Input, (object)data.TransportCharges),
                MakeParam(REMARK_PARAM,           SqlDbType.NVarChar, 100, ParameterDirection.Input, (object)data.Remark ?? System.DBNull.Value),
                MakeParam(OPSTAFFID_PARAM,        SqlDbType.BigInt,     8, ParameterDirection.Input, (object)nOpStaffId),
                MakeParam(OPSTAFFNAME_PARAM,      SqlDbType.NVarChar,  50, ParameterDirection.Input, (object)strOpStaffName),
            };

            if (Execute("InsertDeliverBillCustomerTransportPrice", Params, out strErrText) >= 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 2
0
 /// <summary>
 /// 新增特殊结算价格数据
 /// </summary>
 /// <param name="data"></param>
 /// <param name="nOpStaffId"></param>
 /// <param name="strOpStaffName"></param>
 /// <param name="strErrText"></param>
 /// <returns></returns>
 public bool InsertDeliverBillCustomerTransportPrice(DeliverBillCustomerTransportPrice data, long nOpStaffId, string strOpStaffName, out string strErrText)
 {
     try
     {
         using (TransactionScope transScope = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(2, 0, 0)))
         {
             using (SettlementDAO dao = new SettlementDAO())
             {
                 if (!dao.InsertDeliverBillCustomerTransportPrice(data, nOpStaffId, strOpStaffName, out strErrText))
                 {
                     return(false);
                 }
             }
             transScope.Complete();
         }
         return(true);
     }
     catch (Exception e)
     {
         strErrText = e.Message;
         return(false);
     }
 }
Esempio n. 3
0
        /// <summary>
        /// 读取指定送货单编码的特殊结算价格记录
        /// </summary>
        /// <param name="nDeliverBillId"></param>
        /// <param name="nOpStaffId"></param>
        /// <param name="strOpStaffName"></param>
        /// <param name="strErrText"></param>
        /// <returns></returns>
        public DeliverBillCustomerTransportPrice LoadDeliverBillCustomerTransportPriceByDeliverBillId(long nDeliverBillId, long nOpStaffId, string strOpStaffName, out string strErrText)
        {
            try
            {
                DeliverBillCustomerTransportPrice dataResult = null;
                strErrText = String.Empty;

                using (TransactionScope transScope = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(2, 0, 0)))
                {
                    using (SettlementDAO dao = new SettlementDAO())
                    {
                        dataResult = dao.LoadDeliverBillCustomerTransportPriceByDeliverBillId(nDeliverBillId, nOpStaffId, strOpStaffName, out strErrText);
                    }
                    transScope.Complete();
                }
                return(dataResult);
            }
            catch (Exception e)
            {
                strErrText = e.Message;
                return(null);
            }
        }