예제 #1
0
 BusinessPrint businessPrint; //业务打印功能
 #endregion
 public UCReceivableManage(DataSources.EnumOrderType orderType)
 {
     InitializeComponent();
     //工具栏事件
     this.AddEvent    += new ClickHandler(UCReceivableManage_AddEvent);
     this.EditEvent   += new ClickHandler(UCReceivableManage_EditEvent);
     this.CopyEvent   += new ClickHandler(UCReceivableManage_CopyEvent);
     this.DeleteEvent += new ClickHandler(UCReceivableManage_DeleteEvent);
     this.ViewEvent   += new ClickHandler(UCReceivableManage_ViewEvent);
     this.VerifyEvent += new ClickHandler(UCReceivableManage_VerifyEvent);
     this.SubmitEvent += new ClickHandler(UCReceivableManage_SubmitEvent);
     this.PrintEvent  += new ClickHandler(UCReceivableManage_PrintEvent);
     this.ExportEvent += new ClickHandler(UCReceivableManage_ExportEvent);
     base.SetEvent    += new ClickHandler(UCReceivableManage_SetEvent);
     this.orderType    = orderType;//单据类型
     DataGridViewEx.SetDataGridViewStyle(dgvBillReceivable, colOrderStatus);
     dgvBillReceivable.ReadOnly          = false;
     dgvBillReceivable.HeadCheckChanged += new DataGridViewEx.DelegateOnClick(dgvBillReceivable_HeadCheckChanged);
     foreach (DataGridViewColumn dgvc in dgvBillReceivable.Columns)
     {
         if (dgvc.Name == colCheck.Name)
         {
             continue;
         }
         dgvc.ReadOnly = true;
     }
     SetLable();
     #region 打印预览
     string printObject = "tb_receivable";
     string printTitle  = "财务收款单";
     if (orderType == DataSources.EnumOrderType.PAYMENT)
     {
         printObject = "tb_payment";
         printTitle  = "财务付款单";
     }
     List <string> listNotPrint = new List <string>();
     listNotPrint.Add(colOrgId.Name);
     listNotPrint.Add(colHandle.Name);
     PaperSize paperSize = new PaperSize();
     paperSize.Width  = 297;
     paperSize.Height = 210;
     businessPrint    = new BusinessPrint(dgvBillReceivable, printObject, printTitle, paperSize, listNotPrint);
     #endregion
     //速查
     SetQuick();
     colDealingsBalance.ValueType = typeof(decimal);
     //负数格式化红色
     ControlsConfig.NegativeFormatting(dgvBillReceivable);
 }
예제 #2
0
 BusinessPrint businessPrint; //业务打印功能
 #endregion
 public UCAccountVerificationManage()
 {
     InitializeComponent();
     //工具栏事件
     this.AddEvent                    += new ClickHandler(UCAccountVerificationManage_AddEvent);
     this.EditEvent                   += new ClickHandler(UCAccountVerificationManage_EditEvent);
     this.CopyEvent                   += new ClickHandler(UCAccountVerificationManage_CopyEvent);
     this.ViewEvent                   += new ClickHandler(UCAccountVerificationManage_ViewEvent);
     this.DeleteEvent                 += new ClickHandler(UCAccountVerificationManage_DeleteEvent);
     this.VerifyEvent                 += new ClickHandler(UCAccountVerificationManage_VerifyEvent);
     this.SubmitEvent                 += new ClickHandler(UCAccountVerificationManage_SubmitEvent);
     this.PrintEvent                  += new ClickHandler(UCAccountVerificationManage_PrintEvent);
     this.ExportEvent                 += new ClickHandler(UCAccountVerificationManage_ExportEvent);
     base.SetEvent                    += new ClickHandler(UCAccountVerificationManage_SetEvent);
     dgvVerification.ReadOnly          = false;
     dgvVerification.HeadCheckChanged += new DataGridViewEx.DelegateOnClick(dgvVerification_HeadCheckChanged);
     foreach (DataGridViewColumn dgvc in dgvVerification.Columns)
     {
         if (dgvc.Name == colChk.Name)
         {
             continue;
         }
         dgvc.ReadOnly = true;
     }
     #region 打印预览
     List <string> listNotPrint = new List <string>();
     listNotPrint.Add(colOrgId.Name);
     listNotPrint.Add(colHandle.Name);
     PaperSize paperSize = new PaperSize();
     paperSize.Width  = 297;
     paperSize.Height = 210;
     businessPrint    = new BusinessPrint(dgvVerification, "tb_account_verification", "往来核销", paperSize, listNotPrint);
     #endregion
     colAdvanceBalance.ValueType = typeof(decimal);
     //负数格式化红色
     ControlsConfig.NegativeFormatting(dgvVerification);
 }