/// <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 purchase_billing_id = Convert.ToString(this.gvPurchaseOrderList.CurrentRow.Cells[0].Value.ToString()); UCPurchaseBillView UCPurchaseBillView = new UCPurchaseBillView(purchase_billing_id, this); base.addUserControl(UCPurchaseBillView, "采购开单-查看", "UCPurchaseBillView" + purchase_billing_id + "", this.Tag.ToString(), this.Name); } }
/// <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); }
/// <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 purchase_billing_id = Convert.ToString(this.gvPurchaseOrderList.CurrentRow.Cells["purchase_billing_id"].Value.ToString()); UCPurchaseBillView UCPurchaseBillView = new UCPurchaseBillView(purchase_billing_id, this); base.addUserControl(UCPurchaseBillView, "采购开单-查看", "UCPurchaseBillView" + purchase_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 "采购开单": 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; } }