//导入结算单据 void ImportDocument() { if (windowStatus == WindowStatus.View) { return; } if (txtcCustName.Tag == null)//客户 { MessageBoxEx.Show(string.Format("请选择{0}!", lblCustName.Text.Replace(":", ""))); txtcCustName.Focus(); return; } string paymentType = CommonCtrl.IsNullToString(cboOrderType.SelectedValue);//收付款类型 if (paymentType.Length == 0) { return; } if (orderType == DataSources.EnumOrderType.RECEIVABLE) { #region 应收 DataSources.EnumReceivableType enumType = (DataSources.EnumReceivableType)int.Parse(paymentType); if (enumType == DataSources.EnumReceivableType.RECEIVABLE) { cmsImport.Show(base.btnImport, 0, base.btnImport.Height); return; } else { //预收 frmReceivableByAdvances frm = new frmReceivableByAdvances(txtcCustName.Tag.ToString()); if (frm.ShowDialog() == DialogResult.OK) { BindDocument(frm.listRows, true); } } #endregion } else { #region 应付 StringBuilder sbWhere = new StringBuilder(); DataSources.EnumPaymentType enumType = (DataSources.EnumPaymentType)int.Parse(paymentType); if (enumType == DataSources.EnumPaymentType.PAYMENT) { frmPayment frm = new frmPayment(txtcCustName.Tag.ToString()); if (frm.ShowDialog() == DialogResult.OK) { BindDocument(frm.listRows, false); } } else { frmPaymentByAdvances frm = new frmPaymentByAdvances(txtcCustName.Tag.ToString()); if (frm.ShowDialog() == DialogResult.OK) { BindDocument(frm.listRows, true); } } #endregion } }
/// <summary> /// 导入应付 /// </summary> /// <param name="txtcCust"></param> /// <param name="lblCust"></param> void ImportYingFu2(TextChooser txtcCust, Label lblCust) { if (txtcCust.Tag == null) { MessageBoxEx.Show(string.Format("请选择{0}!", lblCust.Text.TrimEnd(':'))); txtcCust.Focus(); return; } //frmBalanceDocuments frmDocuments = new frmBalanceDocuments(DataSources.EnumOrderType.PAYMENT, txtcCust.Tag.ToString(), ((int)DataSources.EnumPaymentType.PAYMENT).ToString()); frmPayment frmDocuments = new frmPayment(txtcCust.Tag.ToString()); if (frmDocuments.ShowDialog() == DialogResult.OK) { BindDocuments2(frmDocuments.listRows); } }
/// <summary> /// 导入应付 /// </summary> void ImportPayment() { frmPayment frm = new frmPayment(txtcCustName.Tag.ToString()); if (frm.ShowDialog() == DialogResult.OK) { BindDocument(frm.listRows, false); } }