private void dataGridView1_DoubleClick(object sender, EventArgs e) { IGaugeManage serviceGauge = ServerModuleFactory.GetServerModule <IGaugeManage>(); int intGoodsID = m_basicGoodsServer.GetGoodsID(dataGridView1.CurrentRow.Cells["图号型号"].Value.ToString(), dataGridView1.CurrentRow.Cells["物品名称"].Value.ToString(), dataGridView1.CurrentRow.Cells["规格"].Value.ToString()); if (UniversalFunction.GetGoodsType(intGoodsID, m_billInfo.StorageID) == CE_GoodsType.量检具 && m_operateMode == CE_BusinessOperateMode.仓库核实) { 量检具编号录入窗体 form = new 量检具编号录入窗体(m_billNo, intGoodsID, Convert.ToDecimal(dataGridView1.CurrentRow.Cells["数量"].Value), CE_BusinessBillType.入库, true); form.ShowDialog(); } }
/// <summary> /// 量检具入库业务的处理 /// </summary> /// <param name="ctx">数据上下文</param> /// <param name="objInfo">入库业务对象</param> void InDepotGuagesInfo(DepotManagementDataContext ctx, object objInfo) { if (objInfo == null) { return; } int goodsID = 0, operationType = 0; string storageID = null, billNo = null; if (objInfo is S_FetchGoodsDetailBill) { goodsID = ((S_FetchGoodsDetailBill)objInfo).GoodsID; storageID = ((S_FetchGoodsDetailBill)objInfo).StorageID; billNo = ((S_FetchGoodsDetailBill)objInfo).FetchBIllID; operationType = ((S_FetchGoodsDetailBill)objInfo).OperationType; } else if (objInfo is S_InDepotDetailBill) { goodsID = ((S_InDepotDetailBill)objInfo).GoodsID; storageID = ((S_InDepotDetailBill)objInfo).StorageID; billNo = ((S_InDepotDetailBill)objInfo).InDepotBillID; operationType = ((S_InDepotDetailBill)objInfo).OperationType; } else { return; } IGaugeManage serverGauge = ServerModule.ServerModuleFactory.GetServerModule <IGaugeManage>(); if (UniversalFunction.GetGoodsType(goodsID, storageID) == CE_GoodsType.量检具) { serverGauge.OperationGaugeStandingBook(ctx, billNo, CE_MarketingType.出库, operationType); } else { if (storageID == "07") { throw new Exception("非【量检具】无法入库【量检具库】"); } } }