/// <summary> /// 双击查询明细 /// </summary> private void gridViewPrReqList_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { try { if (e.Clicks == 2 && e.Button == MouseButtons.Left) { string formNameStr = "FrmPrReq"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } string prReqNoStr = DataTypeConvert.GetString(gridViewPrReqList.GetFocusedDataRow()["PrReqNo"]); int autoIdInt = DataTypeConvert.GetInt(gridViewPrReqList.GetFocusedDataRow()["AutoId"]); FrmPrReq.queryPrReqNo = prReqNoStr; FrmPrReq.queryListAutoId = autoIdInt; ViewHandler.ShowRightWindow(formNameStr); } } catch (Exception ex) { //ExceptionHandler.HandleException(this.Text + "--双击查询明细错误。", ex); ExceptionHandler.HandleException(this.Text + "--" + tsmiSjcx.Text, ex); } }
/// <summary> /// 双击查询明细 /// </summary> private void gridViewOrderList_RowClick(object sender, RowClickEventArgs e) { try { if (e.Clicks == 2 && e.Button == MouseButtons.Left) { string formNameStr = "FrmOrder_Drag"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } string orderHeadNoStr = DataTypeConvert.GetString(gridViewOrderList.GetFocusedDataRow()["OrderHeadNo"]); int autoIdInt = DataTypeConvert.GetInt(gridViewOrderList.GetFocusedDataRow()["AutoId"]); FrmOrder_Drag.queryOrderHeadNo = orderHeadNoStr; FrmOrder_Drag.queryListAutoId = autoIdInt; ViewHandler.ShowRightWindow("formNameStr"); } } catch (Exception ex) { //ExceptionHandler.HandleException(this.Text + "--双击查询明细错误。", ex); ExceptionHandler.HandleException(this.Text + "--" + f.tsmiSjcxmxcw.Text, ex); } }
/// <summary> /// 双击查询明细 /// </summary> private void gridViewStnSummaryList_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { try { if (e.Clicks == 2 && e.Button == MouseButtons.Left) { string formNameStr = "FrmStnSummary"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } string autoQuotationNoStr = DataTypeConvert.GetString(gridViewStnSummaryList.GetFocusedDataRow()["AutoQuotationNo"]); //string ssNoStr = DataTypeConvert.GetString(gridViewStnSummaryList.GetFocusedDataRow()["SSNo"]); int stnSummaryListAutoIdInt = DataTypeConvert.GetInt(gridViewStnSummaryList.GetFocusedDataRow()["AutoId"]); int listModuleAutoIdInt = DataTypeConvert.GetInt(gridViewStnSummaryList.GetFocusedDataRow()["ListModuleAutoId"]); FrmStnSummary.queryAutoQuotationNoStr = autoQuotationNoStr; //FrmStnSummary.querySSNoStr = ssNoStr; FrmStnSummary.queryStnSummaryListAutoIdInt = stnSummaryListAutoIdInt; FrmStnSummary.queryListModuleAutoIdInt = listModuleAutoIdInt; ViewHandler.ShowRightWindow(formNameStr); } } catch (Exception ex) { ExceptionHandler.HandleException(this.Text + "--双击查询明细错误。", ex); } }
/// <summary> /// 双击查询销售订单信息 /// </summary> private void gridViewSettleAccountsList_RowClick(object sender, RowClickEventArgs e) { try { if (e.Clicks == 2 && e.Button == MouseButtons.Left) { if (btnDelete.Enabled) { string formNameStr = "FrmSalesOrder_History"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } string autoSalesOrderNoStr = DataTypeConvert.GetString(gridViewSettleAccountsList.GetFocusedDataRow()["AutoSalesOrderNo"]); FrmSalesOrder_History.queryAutoSalesOrderNoStr = autoSalesOrderNoStr; //FrmWarehouseWarrant_Drag.queryListAutoId = 0; ViewHandler.ShowRightWindow(formNameStr); } } } catch (Exception ex) { ExceptionHandler.HandleException(this.Text + "--双击查询明细错误。", ex); } }
/// <summary> /// 双击查询明细 /// </summary> private void gridViewQuotationBaseInfo_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { try { if (e.Clicks == 2 && e.Button == MouseButtons.Left) { string formNameStr = "FrmQuotationInfo_History"; if (!commonDAO.QueryUserFormPower(formNameStr)) return; string autoQuotationNoStr = DataTypeConvert.GetString(gridViewQuotationBaseInfo.GetFocusedDataRow()["AutoQuotationNo"]); FrmQuotationInfo_History.queryAutoQuotationNoStr = autoQuotationNoStr; //FrmWarehouseWarrant_Drag.queryListAutoId = 0; ViewHandler.ShowRightWindow(formNameStr); } } catch (Exception ex) { ExceptionHandler.HandleException(this.Text + "--双击查询明细错误。", ex); } }
/// <summary> /// 双击查询明细 /// </summary> private void gridViewStnModuleListInfo_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { try { if (e.Clicks == 2 && e.Button == MouseButtons.Left) { string formNameStr = "FrmStnModule"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } string smNoStr = DataTypeConvert.GetString(gridViewStnModuleListInfo.GetFocusedDataRow()["SMNo"]); FrmStnModule.querySMNoStr = smNoStr; ViewHandler.ShowRightWindow(formNameStr); } } catch (Exception ex) { ExceptionHandler.HandleException(this.Text + "--双击查询明细错误。", ex); } }
/// <summary> /// 双击查看Bom信息 /// </summary> private void treeListBom_DoubleClick(object sender, EventArgs e) { try { string formNameStr = "FrmBomManagement"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } string codeFileNameStr = DataTypeConvert.GetString(treeListBom.FocusedNode["CodeFileName"]); string parentCodeFileNameStr = DataTypeConvert.GetString(treeListBom.FocusedNode["ParentCodeFileName"]); FrmBomManagement.queryCodeFileNameStr = codeFileNameStr; FrmBomManagement.queryParentCodeFileNameStr = parentCodeFileNameStr; ViewHandler.ShowRightWindow(formNameStr); } catch (Exception ex) { //ExceptionHandler.HandleException(this.Text + "--双击查看Bom信息错误。", ex); ExceptionHandler.HandleException(this.Text + "--" + tsmiSjckbom.Text, ex); } }
/// <summary> /// 双击查询明细 /// </summary> private void gridViewRGRHead_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { try { if (e.Clicks == 2 && e.Button == MouseButtons.Left) { string formNameStr = "FrmReturnedGoodsReport"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } string rgrHeadNoStr = DataTypeConvert.GetString(gridViewRGRHead.GetFocusedDataRow()["ReturnedGoodsReportNo"]); FrmReturnedGoodsReport.queryRGRHeadNo = rgrHeadNoStr; //FrmWarehouseWarrant_Drag.queryListAutoId = 0; ViewHandler.ShowRightWindow(formNameStr); } } catch (Exception ex) { ExceptionHandler.HandleException(this.Text + "--双击查询明细错误。", ex); } }
/// <summary> /// 双击查询明细 /// </summary> private void gridViewDesignBom_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { try { if (e.Clicks == 2 && e.Button == MouseButtons.Left) { string formNameStr = "FrmPBDesignBom_PS_New"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } string salesOrderNoStr = DataTypeConvert.GetString(gridViewDesignBom.GetFocusedDataRow()["SalesOrderNo"]); int autoIdInt = DataTypeConvert.GetInt(gridViewDesignBom.GetFocusedDataRow()["AutoId"]); FrmPBDesignBom_PS_New.QuerySalesOrderNoStr = salesOrderNoStr; FrmPBDesignBom_PS_New.QueryPBBomListAutoId = autoIdInt; ViewHandler.ShowRightWindow(formNameStr); } } catch (Exception ex) { ExceptionHandler.HandleException(this.Text + "--双击查询明细错误。", ex); } }
/// <summary> /// 双击查询明细 /// </summary> private void gridViewIAHead_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { try { if (e.Clicks == 2 && e.Button == MouseButtons.Left) { string formNameStr = "FrmInventoryAdjustments_Drag"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } string inventoryAdjustmentsNoStr = DataTypeConvert.GetString(gridViewIAHead.GetFocusedDataRow()["InventoryAdjustmentsNo"]); FrmInventoryAdjustments_Drag.queryIAHeadNo = inventoryAdjustmentsNoStr; FrmInventoryAdjustments_Drag.queryListAutoId = 0; ViewHandler.ShowRightWindow(formNameStr); } } catch (Exception ex) { //ExceptionHandler.HandleException(this.Text + "--双击查询明细错误。", ex); ExceptionHandler.HandleException(this.Text + "--" + f.tsmiSjcxmxcw.Text, ex); } }
/// <summary> /// 打开相关窗体 /// </summary> private void OpenRelationForm(int workFlowsTypeInt, int lineTypeInt, string dataNoStr) { string formNameStr = ""; switch (workFlowsTypeInt) { case (int)WorkFlowsHandleDAO.OrderType.请购单: switch (lineTypeInt) { case (int)WorkFlowsHandleDAO.LineType.保存: formNameStr = "FrmOrder_Drag"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } FrmOrder_Drag.queryPrReqNo = dataNoStr; FrmOrder_Drag.queryOrderHeadNo = ""; FrmOrder_Drag.queryListAutoId = 0; break; case (int)WorkFlowsHandleDAO.LineType.任务分配: formNameStr = "FrmPrReqListDistribution"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } FrmPrReqListDistribution.queryPrReqNo = dataNoStr; break; default: formNameStr = "FrmPrReq"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } FrmPrReq.queryPrReqNo = dataNoStr; FrmPrReq.queryListAutoId = 0; break; } break; case (int)WorkFlowsHandleDAO.OrderType.采购订单: switch (lineTypeInt) { case (int)WorkFlowsHandleDAO.LineType.保存: formNameStr = "FrmWarehouseWarrant_Drag"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } FrmWarehouseWarrant_Drag.queryOrderHeadNo = dataNoStr; FrmWarehouseWarrant_Drag.queryWWHeadNo = ""; FrmWarehouseWarrant_Drag.queryListAutoId = 0; break; default: formNameStr = "FrmOrder_Drag"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } FrmOrder_Drag.queryOrderHeadNo = dataNoStr; FrmOrder_Drag.queryListAutoId = 0; break; } break; case (int)WorkFlowsHandleDAO.OrderType.工单: formNameStr = "FrmProductionPlan"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } FrmProductionPlan.queryPlanNo = dataNoStr; break; } ViewHandler.ShowRightWindow(formNameStr); }
/// <summary> /// 打开相关窗体 /// </summary> private void OpenRelationForm(string tableNameStr, string newOrderNoStr, string oldOrderNoStr) { string formNameStr = ""; switch (tableNameStr) { //采购 case "PUR_PrReqHead": //请购单 formNameStr = "FrmPrReq"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } FrmPrReq.queryPrReqNo = newOrderNoStr; FrmPrReq.queryListAutoId = 0; break; case "PUR_OrderHead": //采购单 formNameStr = "FrmOrder_Drag"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } FrmOrder_Drag.queryOrderHeadNo = newOrderNoStr; if (newOrderNoStr == "") { FrmOrder_Drag.queryPrReqNo = oldOrderNoStr; } FrmOrder_Drag.queryListAutoId = 0; break; case "PUR_SettlementHead": //采购结账单 formNameStr = "FrmSettlement_Drag"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } FrmSettlement_Drag.querySettlementNo = newOrderNoStr; break; //销售 case "SA_QuotationBaseInfo": //报价单 formNameStr = "FrmQuotationInfo_History"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } FrmQuotationInfo_History.queryAutoQuotationNoStr = newOrderNoStr; break; case "SA_SalesOrder": //销售订单 formNameStr = "FrmSalesOrder_History"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } FrmSalesOrder_History.queryAutoSalesOrderNoStr = newOrderNoStr; break; case "SA_SettleAccountsHead": //销售结账单 formNameStr = "FrmSettleAccounts_Drag"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } FrmSettleAccounts_Drag.querySettleAccountNo = newOrderNoStr; break; case "SA_StnSummary": //工位描述登记 formNameStr = "FrmStnModule"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } FrmStnModule.querySMNoStr = newOrderNoStr; break; //库存 case "INV_WarehouseWarrantHead": //入库单 formNameStr = "FrmWarehouseWarrant_Drag"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } FrmWarehouseWarrant_Drag.queryWWHeadNo = newOrderNoStr; break; case "INV_WarehouseReceiptHead": //出库单 formNameStr = "FrmWarehouseReceipt_Drag"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } FrmWarehouseReceipt_Drag.queryWRHeadNo = newOrderNoStr; break; case "INV_SpecialWarehouseWarrantHead": //预算外入库单 formNameStr = "FrmSpecialWarehouseWarrant"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } FrmSpecialWarehouseWarrant.querySWWHeadNo = newOrderNoStr; break; case "INV_SpecialWarehouseReceiptHead": //预算外出库单 formNameStr = "FrmSpecialWarehouseReceipt"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } FrmSpecialWarehouseReceipt.querySWRHeadNo = newOrderNoStr; break; case "INV_InventoryMoveHead": //库存移动单 formNameStr = "FrmInventoryMove_Drag"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } FrmInventoryMove_Drag.queryIMHeadNo = newOrderNoStr; FrmInventoryMove_Drag.queryListAutoId = 0; break; case "INV_InventoryAdjustmentsHead": //库存调整单 formNameStr = "FrmInventoryAdjustments_Drag"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } FrmInventoryAdjustments_Drag.queryIAHeadNo = newOrderNoStr; FrmInventoryAdjustments_Drag.queryListAutoId = 0; break; case "INV_ReturnedGoodsReportHead": //退货单 formNameStr = "FrmReturnedGoodsReport"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } FrmReturnedGoodsReport.queryRGRHeadNo = newOrderNoStr; break; //生产 case "PB_ProductionScheduleBom": //生产视图登记 formNameStr = "FrmPBDesignBom_PS_New"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } break; case "PB_ProductionPlan": //工单 formNameStr = "FrmProductionPlan"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } FrmProductionPlan.queryPlanNo = newOrderNoStr; break; } ViewHandler.ShowRightWindow(formNameStr); }