/// <summary> /// 窗体加载 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FrmBindZtoElecUserInfo_Load(object sender, EventArgs e) { ZtoElecUserInfoEntity elecUserInfoEntity = BillPrintHelper.GetElecUserInfoEntity(); if (elecUserInfoEntity != null) { txtCustomerID.Text = elecUserInfoEntity.Kehuid; txtCustomerPassword.Text = elecUserInfoEntity.Pwd; } var elecUserInfoExtendEntity = BillPrintHelper.GetElecUserInfoExtendEntity(); if (elecUserInfoExtendEntity != null) { txtSiteCode.Text = elecUserInfoExtendEntity.siteCode; txtSiteName.Text = elecUserInfoExtendEntity.siteName; } }
/// <summary> /// /// </summary> public BindZtoElecUserInfo() { InitializeComponent(); ZtoElecUserInfoEntity elecUserInfoEntity = BillPrintHelper.GetElecUserInfoEntity(); if (elecUserInfoEntity != null) { txtCustomerID.Text = elecUserInfoEntity.Kehuid; txtCustomerPassword.Text = elecUserInfoEntity.Pwd; } var elecUserInfoExtendEntity = BillPrintHelper.GetElecUserInfoExtendEntity(); if (elecUserInfoExtendEntity != null) { txtSiteCode.Text = elecUserInfoExtendEntity.siteCode; txtSiteName.Text = elecUserInfoExtendEntity.siteName; } }
/// <summary> /// 报表字段和数据转换函数 /// </summary> private void ReportFetchRecord() { if (_list != null && _list.Count > 0) { var elecExtendInfoEntity = BillPrintHelper.GetElecUserInfoExtendEntity(); var tempCount = 0; foreach (ZtoPrintBillEntity billEntity in _list) { ++tempCount; _report.DetailGrid.Recordset.Append(); if (_billCode != null) { _billCode.AsString = billEntity.BillCode; } if (_senderName != null) { _senderName.AsString = billEntity.SendMan; } if (_senderAddress != null) { _senderAddress.AsString = billEntity.SendProvince + billEntity.SendCity + billEntity.SendCounty + billEntity.SendAddress; } if (_senderCompany != null) { _senderCompany.AsString = billEntity.SendCompany; } if (_senderPhone != null) { _senderPhone.AsString = billEntity.SendPhone; } if (_departure != null) { _departure.AsString = billEntity.SendDeparture; } if (_receiverName != null) { _receiverName.AsString = billEntity.ReceiveMan; } if (_receiverAddress != null) { var tempAddress = billEntity.ReceiveAddress; if (!string.IsNullOrEmpty(tempAddress)) { if (!string.IsNullOrEmpty(billEntity.ReceiveProvince)) { tempAddress = tempAddress.Replace(billEntity.ReceiveProvince, ""); } if (!string.IsNullOrEmpty(billEntity.ReceiveCity)) { tempAddress = tempAddress.Replace(billEntity.ReceiveCity, ""); } if (!string.IsNullOrEmpty(billEntity.ReceiveCounty)) { tempAddress = tempAddress.Replace(billEntity.ReceiveCounty, ""); } } _receiverAddress.AsString = billEntity.ReceiveProvince + billEntity.ReceiveCity + billEntity.ReceiveCounty + tempAddress; } if (_receiverCompany != null) { _receiverCompany.AsString = billEntity.ReceiveCompany; } if (_receiverPhone != null) { _receiverPhone.AsString = billEntity.ReceivePhone; } if (_destination != null) { _destination.AsString = billEntity.ReceiveDestination; } if (_description != null) { _description.AsString = billEntity.GoodsName; } if (_amount != null) { _amount.AsString = billEntity.TotalNumber; } if (_remarks != null) { _remarks.AsString = billEntity.Remark; } if (_sendTime != null) { _sendTime.AsString = billEntity.SendDate; } if (_weight != null) { _weight.AsString = billEntity.Weight; } //if (totalMoney != null) //{ // totalMoney.AsString = billEntity.TranFee; //} if (_bigPen != null) { _bigPen.AsString = billEntity.BigPen; } if (_countField != null) { _countField.AsString = _list.Count.ToString(CultureInfo.InvariantCulture); } if (_pageField != null) { _pageField.AsString = tempCount.ToString(CultureInfo.InvariantCulture); } if (_qRCodeField != null) { } if (_orderNumberField != null) { _orderNumberField.AsString = billEntity.OrderNumber; } if (_toPayMentField != null) { _toPayMentField.AsString = billEntity.TOPAYMENT + "元"; } if (_goodsPayMentField != null) { _goodsPayMentField.AsString = billEntity.GOODS_PAYMENT + "元"; } if (_sendSiteField != null) { if (elecExtendInfoEntity != null) { // 上海(02100) _sendSiteField.AsString = string.Format("{0}({1})", elecExtendInfoEntity.siteName, elecExtendInfoEntity.siteCode); } } _report.DetailGrid.Recordset.Post(); } } }
/// <summary> /// 报表字段和数据转换函数 /// </summary> private void ReportFetchRecord() { if (_list != null && _list.Count > 0) { var elecExtendInfoEntity = BillPrintHelper.GetElecUserInfoExtendEntity(); foreach (ZtoPrintBillEntity billEntity in _list) { _report.DetailGrid.Recordset.Append(); if (billCode != null) { billCode.AsString = billEntity.BillCode; } if (senderName != null) { senderName.AsString = billEntity.SendMan; } if (senderAddress != null) { senderAddress.AsString = billEntity.SendProvince + billEntity.SendCity + billEntity.SendCounty + billEntity.SendAddress; } if (senderCompany != null) { senderCompany.AsString = billEntity.SendCompany; } if (senderPhone != null) { senderPhone.AsString = billEntity.SendPhone; } if (departure != null) { departure.AsString = billEntity.SendDeparture; } if (receiverName != null) { receiverName.AsString = billEntity.ReceiveMan; } if (receiverAddress != null) { var tempAddress = billEntity.ReceiveAddress; if (!string.IsNullOrEmpty(tempAddress)) { if (!string.IsNullOrEmpty(billEntity.ReceiveProvince)) { tempAddress = tempAddress.Replace(billEntity.ReceiveProvince, ""); } if (!string.IsNullOrEmpty(billEntity.ReceiveCity)) { tempAddress = tempAddress.Replace(billEntity.ReceiveCity, ""); } if (!string.IsNullOrEmpty(billEntity.ReceiveCounty)) { tempAddress = tempAddress.Replace(billEntity.ReceiveCounty, ""); } } receiverAddress.AsString = billEntity.ReceiveProvince + billEntity.ReceiveCity + billEntity.ReceiveCounty + tempAddress; } if (receiverCompany != null) { receiverCompany.AsString = billEntity.ReceiveCompany; } if (receiverPhone != null) { receiverPhone.AsString = billEntity.ReceivePhone; } if (destination != null) { destination.AsString = billEntity.ReceiveDestination; } if (description != null) { description.AsString = billEntity.GoodsName; } if (amount != null) { amount.AsString = string.IsNullOrEmpty(billEntity.TotalNumber) ? "" : billEntity.TotalNumber; } if (remarks != null) { remarks.AsString = billEntity.Remark; } if (sendTime != null) { sendTime.AsString = billEntity.SendDate; } if (weight != null) { weight.AsString = string.IsNullOrEmpty(billEntity.Weight) ? "" : billEntity.Weight; } if (totalMoney != null) { totalMoney.AsString = string.IsNullOrEmpty(billEntity.TranFee) ? "" : billEntity.TranFee; } if (bigPen != null) { bigPen.AsString = billEntity.BigPen; } if (_sendSiteField != null) { if (elecExtendInfoEntity != null) { // 上海(02100) _sendSiteField.AsString = string.Format("{0}({1})", elecExtendInfoEntity.siteName, elecExtendInfoEntity.siteCode); } } _report.DetailGrid.Recordset.Post(); } } }