예제 #1
0
 bool isAutoClose = false;//是否自动关闭
 #endregion
 public UCReceivableAdd(WindowStatus status, string orderId, UCReceivableManage uc, DataSources.EnumOrderType orderType)
 {
     InitializeComponent();
     this.dgvBalanceDocuments.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                 | System.Windows.Forms.AnchorStyles.Right | AnchorStyles.Bottom)));
     this.windowStatus = status;
     this.orderID = orderId;
     this.uc = uc;
     this.orderType = orderType;
     this.orderTypeName = DataSources.GetDescription(orderType, true);
     colBillingMoney.ValueType = typeof(decimal);
     colSettledMoney.ValueType = typeof(decimal);
     colSettlementMoney.ValueType = typeof(decimal);
     colWaitSettledMoney.ValueType = typeof(decimal);
     colPaidMoney.ValueType = typeof(decimal);
     //colDepositRate.ValueType = typeof(decimal);
     //colDeduction.ValueType = typeof(decimal);
     colMoney.ValueType = typeof(decimal);
     dgvBalanceDocuments.RowHeadersVisible = true;
     dgvPaymentDetail.RowHeadersVisible = true;
     base.SaveEvent += new ClickHandler(UCReceivableAdd_SaveEvent);
     base.ImportEvent += new ClickHandler(UCReceivableAdd_ImportEvent);
     base.SubmitEvent += new ClickHandler(UCReceivableAdd_SubmitEvent);
     base.CancelEvent += new ClickHandler(UCReceivableAdd_CancelEvent);
     base.VerifyEvent += new ClickHandler(UCReceivableAdd_VerifyEvent);
     base.InvalidOrActivationEvent += new ClickHandler(UCReceivableAdd_InvalidOrActivationEvent);
     base.CopyEvent += new ClickHandler(UCReceivableAdd_CopyEvent);
     base.EditEvent += new ClickHandler(UCReceivableAdd_EditEvent);
     base.DeleteEvent += new ClickHandler(UCReceivableAdd_DeleteEvent);
     DataGridViewEx.SetDataGridViewStyle(dgvPaymentDetail, colRemark);
     DataGridViewEx.SetDataGridViewStyle(dgvBalanceDocuments, colDocumentRemark);
 }
예제 #2
0
 public UCReceivableAdd(WindowStatus status, string orderId, UCReceivableManage uc, DataSources.EnumOrderType orderType)
 {
     InitializeComponent();
     this.dgvBalanceDocuments.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                 | System.Windows.Forms.AnchorStyles.Right | AnchorStyles.Bottom)));
     this.windowStatus = status;
     this.orderID = orderId;//单据ID
     this.uc = uc;//默认页面
     this.orderType = orderType;//单据类型
     this.orderTypeName = DataSources.GetDescription(orderType, true);
     //设置单元格类型
     colBillingMoney.ValueType = typeof(decimal);
     colSettledMoney.ValueType = typeof(decimal);
     colSettlementMoney.ValueType = typeof(decimal);
     colWaitSettledMoney.ValueType = typeof(decimal);
     colPaidMoney.ValueType = typeof(decimal);
     //colDepositRate.ValueType = typeof(decimal);
     //colDeduction.ValueType = typeof(decimal);
     colMoney.ValueType = typeof(decimal);
     dgvBalanceDocuments.RowHeadersVisible = true;
     dgvPaymentDetail.RowHeadersVisible = true;
     //工具栏事件
     base.SaveEvent += new ClickHandler(UCReceivableAdd_SaveEvent);
     base.ImportEvent += new ClickHandler(UCReceivableAdd_ImportEvent);
     base.SubmitEvent += new ClickHandler(UCReceivableAdd_SubmitEvent);
     base.CancelEvent += new ClickHandler(UCReceivableAdd_CancelEvent);
     base.VerifyEvent += new ClickHandler(UCReceivableAdd_VerifyEvent);
     base.InvalidOrActivationEvent += new ClickHandler(UCReceivableAdd_InvalidOrActivationEvent);
     base.CopyEvent += new ClickHandler(UCReceivableAdd_CopyEvent);
     base.EditEvent += new ClickHandler(UCReceivableAdd_EditEvent);
     base.DeleteEvent += new ClickHandler(UCReceivableAdd_DeleteEvent);
     base.ViewEvent += new ClickHandler(UCReceivableAdd_ViewEvent);
     base.PrintEvent += new ClickHandler(UCReceivableAdd_PrintEvent);
     base.SetEvent += new ClickHandler(UCReceivableAdd_SetEvent);
     //
     DataGridViewEx.SetDataGridViewStyle(dgvPaymentDetail, colRemark);
     DataGridViewEx.SetDataGridViewStyle(dgvBalanceDocuments, colDocumentRemark);
     txtBankAccount.InnerTextBox.TextChanged += new EventHandler(txtBankAccount_ValueChanged);
     //打印预览
     detailPrint = new BusinessDetailPrint(Title);
     //快速设置
     SetQuick();
     //负数格式化红色
     ControlsConfig.NegativeFormatting(dgvBalanceDocuments);
     ControlsConfig.NegativeFormatting(dgvPaymentDetail);
 }