Exemple #1
0
        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;
            }
        }
Exemple #2
0
        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;
            }
        }