예제 #1
0
        void OpenDocument()
        {
            if (dgvReport.CurrentRow == null)
            {
                return;
            }
            string orderId = Convert.ToString(this.dgvReport.CurrentRow.Cells[colpurchase_billing_id.Name].Value);

            if (orderId.Length == 0)
            {
                return;
            }
            string type = dgvReport.CurrentRow.Cells[colType.Name].Value.ToString();

            switch (type)
            {
            case "采购开单":
                UCPurchaseBillView ucPurchaseView = new UCPurchaseBillView(orderId, null);
                base.addUserControl(ucPurchaseView, "采购开单-查看", "UCPurchaseBillView" + orderId + "", this.Tag.ToString(), this.Name);
                break;

            case "采购收款":
                UCReceivableAdd ucPayable = new UCReceivableAdd(WindowStatus.View, orderId, null, DataSources.EnumOrderType.PAYMENT);
                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;
            }
        }
예제 #2
0
        /// <summary>
        /// 打开采购开单
        /// </summary>
        void OpenDocument()
        {
            if (dgvReport.CurrentRow == null)
            {
                return;
            }
            string purchase_billing_id = Convert.ToString(this.dgvReport.CurrentRow.Cells[colID.Name].Value);

            if (purchase_billing_id.Length == 0)
            {
                return;
            }
            UCPurchaseBillView UCPurchaseBillView = new UCPurchaseBillView(purchase_billing_id, null);

            base.addUserControl(UCPurchaseBillView, "采购开单-查看", "UCPurchaseBillView" + purchase_billing_id + "", this.Tag.ToString(), this.Name);
        }