/// <summary>
 /// 双击查看明细
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void gvPurchaseOrderList_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex > -1 && e.ColumnIndex > -1)//双击表头或列头时不起作用
     {
         string         sale_billing_id    = Convert.ToString(this.gvPurchaseOrderList.CurrentRow.Cells[0].Value.ToString());
         UCSaleBillView UCPurchaseBillView = new UCSaleBillView(sale_billing_id, this);
         base.addUserControl(UCPurchaseBillView, "销售开单-查看", "UCPurchaseBillView" + sale_billing_id + "", this.Tag.ToString(), this.Name);
     }
 }
 /// <summary>
 /// 打开销售开单
 /// </summary>
 void OpenDocument()
 {
     if (dgvReport.CurrentRow == null)
     {
         return;
     }
     string sale_billing_id = Convert.ToString(this.dgvReport.CurrentRow.Cells[colID.Name].Value);
     if (sale_billing_id.Length == 0)
     {
         return;
     }
     UCSaleBillView view = new UCSaleBillView(sale_billing_id, null);
     base.addUserControl(view, "销售开单-查看", "UCSaleBillView" + sale_billing_id + "", this.Tag.ToString(), this.Name);
 }
 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;
     }
 }
 /// <summary>
 /// 双击查看明细
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void gvPurchaseOrderList_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex > -1 && e.ColumnIndex > -1)//双击表头或列头时不起作用   
     {
         string sale_billing_id = Convert.ToString(this.gvPurchaseOrderList.CurrentRow.Cells[0].Value.ToString());
         UCSaleBillView UCPurchaseBillView = new UCSaleBillView(sale_billing_id, this);
         base.addUserControl(UCPurchaseBillView, "销售开单-查看", "UCPurchaseBillView" + sale_billing_id + "", this.Tag.ToString(), this.Name);
     }
 }
 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;
     }
 }