Пример #1
0
        /// <summary>
        /// 新增特殊承运价格数据
        /// </summary>
        /// <param name="data"></param>
        /// <param name="nOpStaffId"></param>
        /// <param name="strOpStaffName"></param>
        /// <param name="strErrText"></param>
        /// <returns></returns>
        public bool InsertDeliverBillCarrierTransportPrice(DeliverBillCarrierTransportPrice 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("InsertDeliverBillCarrierTransportPrice", Params, out strErrText) >= 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #2
0
 /// <summary>
 /// 新增特殊承运价格数据
 /// </summary>
 /// <param name="data"></param>
 /// <param name="nOpStaffId"></param>
 /// <param name="strOpStaffName"></param>
 /// <param name="strErrText"></param>
 /// <returns></returns>
 public bool InsertDeliverBillCarrierTransportPrice(DeliverBillCarrierTransportPrice 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.InsertDeliverBillCarrierTransportPrice(data, nOpStaffId, strOpStaffName, out strErrText))
                 {
                     return(false);
                 }
             }
             transScope.Complete();
         }
         return(true);
     }
     catch (Exception e)
     {
         strErrText = e.Message;
         return(false);
     }
 }
Пример #3
0
        /// <summary>
        /// 读取指定送货单编码的特殊承运价格记录
        /// </summary>
        /// <param name="nDeliverBillId"></param>
        /// <param name="nOpStaffId"></param>
        /// <param name="strOpStaffName"></param>
        /// <param name="strErrText"></param>
        /// <returns></returns>
        public DeliverBillCarrierTransportPrice LoadDeliverBillCarrierTransportPriceByDeliverBillId(long nDeliverBillId, long nOpStaffId, string strOpStaffName, out string strErrText)
        {
            try
            {
                DeliverBillCarrierTransportPrice dataResult = null;
                strErrText = String.Empty;

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