/// <summary> /// 删除特殊承运价格记录数据 /// </summary> /// <param name="nId"></param> /// <param name="nOpStaffId"></param> /// <param name="strOpStaffName"></param> /// <param name="strErrText"></param> /// <returns></returns> public bool DeleteDeliverBillCarrierTransportPrice(long nId, 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.DeleteDeliverBillCarrierTransportPrice(nId, nOpStaffId, strOpStaffName, out strErrText)) return false; } transScope.Complete(); } return true; } catch (Exception e) { strErrText = e.Message; return false; } }
/// <summary> /// 根据综合条件读取特殊结算价格数据 /// </summary> /// <param name="strStartTime"></param> /// <param name="strEndTime"></param> /// <param name="strDeliverBillNo"></param> /// <param name="strCustomerName"></param> /// <param name="strDeliveryNo"></param> /// <param name="nOpStaffId"></param> /// <param name="strOpStaffName"></param> /// <param name="strErrText"></param> /// <returns></returns> public List<DeliverBillCustomerTransportPrice> LoadDeliverBillCustomerTransportPricesByConditions(string strStartTime, string strEndTime, string strDeliverBillNo, string strCustomerName, string strDeliveryNo, long nOpStaffId, string strOpStaffName, out string strErrText) { try { List<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.LoadDeliverBillCustomerTransportPricesByConditions(strStartTime, strEndTime, strDeliverBillNo, strCustomerName, strDeliveryNo, nOpStaffId, strOpStaffName, out strErrText); } transScope.Complete(); } return dataResult; } catch (Exception e) { strErrText = e.Message; return null; } }
/// <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; } }
/// <summary> /// 读取指定发票的明细数据 /// </summary> /// <param name="nCustomerTransportChargesSettlementId"></param> /// <param name="nOpStaffId"></param> /// <param name="strOpStaffName"></param> /// <param name="strErrText"></param> /// <returns></returns> public List<CustomerTransportChargesSettlementDetail> LoadCustomerTransportChargesSettlementDetails(long nCustomerTransportChargesSettlementId, long nOpStaffId, string strOpStaffName, out string strErrText) { try { List<CustomerTransportChargesSettlementDetail> dataResult = null; strErrText = String.Empty; using (TransactionScope transScope = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(2, 0, 0))) { using (SettlementDAO dao = new SettlementDAO()) { dataResult = dao.LoadCustomerTransportChargesSettlementDetails(nCustomerTransportChargesSettlementId, nOpStaffId, strOpStaffName, out strErrText); } transScope.Complete(); } return dataResult; } catch (Exception e) { strErrText = e.Message; return null; } }
/// <summary> /// 根据条件读取客户对帐单数据 /// </summary> /// <param name="strStartTime"></param> /// <param name="strEndTime"></param> /// <param name="strPayerName"></param> /// <param name="strReceiverName"></param> /// <param name="strStartCountry"></param> /// <param name="strStartProvince"></param> /// <param name="strStartCity"></param> /// <param name="strDestCountry"></param> /// <param name="strDestProvince"></param> /// <param name="strDestCity"></param> /// <param name="strCarrierName"></param> /// <param name="strCarNo"></param> /// <param name="strGoodsName"></param> /// <param name="strAllowStatementWhenConsignedDeliverPlanNotCompleted"></param> /// <param name="nOpStaffId"></param> /// <param name="strOpStaffName"></param> /// <param name="strErrText"></param> /// <returns></returns> public List<CustomerStatement> LoadCustomerStatementByConditions(string strStartTime, string strEndTime, string strPayerName, string strReceiverName, string strStartCountry, string strStartProvince, string strStartCity, string strDestCountry, string strDestProvince, string strDestCity, string strCarrierName, string strCarNo, string strGoodsName, string strAllowStatementWhenConsignedDeliverPlanNotCompleted, long nOpStaffId, string strOpStaffName, out string strErrText) { try { List<CustomerStatement> dataResult = null; strErrText = String.Empty; using (TransactionScope transScope = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(2, 0, 0))) { using (SettlementDAO dao = new SettlementDAO()) { dataResult = dao.LoadCustomerStatementByConditions(strStartTime, strEndTime, strPayerName, strReceiverName, strStartCountry, strStartProvince, strStartCity, strDestCountry, strDestProvince, strDestCity, strCarrierName, strCarNo, strGoodsName, strAllowStatementWhenConsignedDeliverPlanNotCompleted, nOpStaffId, strOpStaffName, out strErrText); } transScope.Complete(); } return dataResult; } catch (Exception e) { strErrText = e.Message; return null; } }
/// <summary> /// 新增承运单位结算记录 /// </summary> /// <param name="data"></param> /// <param name="listDetail"></param> /// <param name="nOpStaffId"></param> /// <param name="strOpStaffName"></param> /// <param name="strErrText"></param> /// <returns></returns> public long InsertCarrierTransportChargesSettlement(CarrierTransportChargesSettlement data, List<CarrierTransportChargesSettlementDetail> listDetail, long nOpStaffId, string strOpStaffName, out string strErrText) { long nCarrierTransportChargesSettlementId = 0; try { using (TransactionScope transScope = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(2, 0, 0))) { using (SettlementDAO dao = new SettlementDAO()) { //新增结算数据 nCarrierTransportChargesSettlementId = dao.InsertCarrierTransportChargesSettlement(data, nOpStaffId, strOpStaffName, out strErrText); if (nCarrierTransportChargesSettlementId <= 0) return 0; //新增结算明细数据 foreach (CarrierTransportChargesSettlementDetail detail in listDetail) { detail.CarrierTransportChargesSettlementId = nCarrierTransportChargesSettlementId; if (!dao.InsertCarrierTransportChargesSettlementDetail(detail, nOpStaffId, strOpStaffName, out strErrText)) { return 0; } } } transScope.Complete(); } return nCarrierTransportChargesSettlementId; } catch (Exception e) { strErrText = e.Message; return 0; } }