Beispiel #1
0
        private void Init() //初始化方法
        {
            #region 数据表数据选择
            dgvTable.CellDoubleClick += delegate(object sender, DataGridViewCellEventArgs args)
            {
                if (args.RowIndex < 0)
                {
                    return;
                }
                var stId = dgvTable.Rows[args.RowIndex].Cells["drtxt_st_id"].Value.ToString();
                if (String.IsNullOrEmpty(stId))
                {
                    MessageBoxEx.Show("无效的结算单信息", "操作提示");
                    return;
                }
                var uc = new UCThreeGuarantySettlementView
                {
                    SettlementId = stId
                };
                uc.addUserControl(uc, "三包结算单-浏览", "UCThreeGuarantySettlementView", Tag.ToString(), Name);
            };
            #endregion

            SetFuncationButtonVisible();
            InitQueryControlDataSource();
            dgvTable.CellFormatting += (sender, args) => ConvertDataGridColumnsData(args);
            FuncationRegiste();
        }
        private void Init() //初始化方法
        {
            #region 数据表数据选择
            dgvTable.CellDoubleClick += delegate(object sender, DataGridViewCellEventArgs args)
            {
                if (args.RowIndex < 0) return;
                var stId = dgvTable.Rows[args.RowIndex].Cells["drtxt_st_id"].Value.ToString();
                if (String.IsNullOrEmpty(stId))
                {
                    MessageBoxEx.Show("无效的结算单信息", "操作提示");
                    return;
                }
                var uc = new UCThreeGuarantySettlementView
                {
                    SettlementId = stId
                };
                uc.addUserControl(uc, "三包结算单-浏览", "UCThreeGuarantySettlementView", Tag.ToString(), Name);
            };
            #endregion

            SetFuncationButtonVisible();
            InitQueryControlDataSource();
            dgvTable.CellFormatting += (sender, args) => ConvertDataGridColumnsData(args);
            FuncationRegiste();
        }
 void OpenDocument()
 {
     if (dgvReport.CurrentRow == null)
     {
         return;
     }
     string orderId = Convert.ToString(this.dgvReport.CurrentRow.Cells[colID.Name].Value);
     if (orderId.Length == 0)
     {
         return;
     }
     string type = dgvReport.CurrentRow.Cells[colType.Name].Value.ToString();
     switch (type)
     {
         case "销售开单":
             UCSaleBillView ucSaleView = new UCSaleBillView(orderId, null);
             base.addUserControl(ucSaleView, "销售开单-查看", "UCSaleBillView" + orderId + "", this.Tag.ToString(), this.Name);
             break;
         case "三包结算单":
             UCThreeGuarantySettlementView ucView = new UCThreeGuarantySettlementView();
             ucView.SettlementId = orderId;
             base.addUserControl(ucView, "三包结算单-查看", "UCThreeGuarantySettlementView" + orderId, this.Tag.ToString(), this.Name);
             break;
         case "维修结算单":
             UCRepairBalanceView ucRepairView = new UCRepairBalanceView(orderId);
             base.addUserControl(ucRepairView, "维修结算单-查看", "UCRepairBalanceView" + orderId, this.Tag.ToString(), this.Name);
             break;
         case "销售收款":
             UCReceivableAdd ucPayable = new UCReceivableAdd(WindowStatus.View, orderId, null, DataSources.EnumOrderType.RECEIVABLE);
             base.addUserControl(ucPayable, "应收账款-预览", "UCReceivableAdd" + orderId, this.Tag.ToString(), this.Name);
             break;
         case "往来核销":
             UCAccountVerificationAdd ucAccountVerificationView = new UCAccountVerificationAdd(WindowStatus.View, orderId, null);
             base.addUserControl(ucAccountVerificationView, "往来核销-预览", "UCAccountVerificationAdd" + orderId, this.Tag.ToString(), this.Name);
             break;
     }
 }
 void OpenDocument()
 {
     if (dgvReport.CurrentRow == null)
     {
         return;
     }
     string orderId = Convert.ToString(this.dgvReport.CurrentRow.Cells[colID.Name].Value);
     if (orderId.Length == 0)
     {
         return;
     }
     string type = dgvReport.CurrentRow.Cells[colType.Name].Value.ToString();
     switch (type)
     {
         case "销售开单":
             UCSaleBillView ucSaleView = new UCSaleBillView(orderId, null);
             base.addUserControl(ucSaleView, "销售开单-查看", "UCSaleBillView" + orderId + "", this.Tag.ToString(), this.Name);
             break;
         case "三包结算单":
             UCThreeGuarantySettlementView ucView = new UCThreeGuarantySettlementView();
             ucView.SettlementId = orderId;
             base.addUserControl(ucView, "三包结算单-查看", "UCThreeGuarantySettlementView" + orderId, this.Tag.ToString(), this.Name);
             break;
         case "维修结算单":
             UCRepairBalanceView ucRepairView = new UCRepairBalanceView(orderId);
             base.addUserControl(ucRepairView, "维修结算单-查看", "UCRepairBalanceView" + orderId, this.Tag.ToString(), this.Name);
             break;
     }
 }