Exemple #1
0
        /// <summary>
        /// 工具账务操作
        /// </summary>
        /// <param name="ctx">数据上下文</param>
        /// <param name="billNo">单据号</param>
        /// <param name="goodsID">物品ID</param>
        /// <param name="provider">供应商</param>
        /// <param name="operationCount">操作数量</param>
        /// <param name="workID">操作人员ID</param>
        void ToolsOperation(DepotManagementDataContext ctx, string billNo, int goodsID, string provider,
                            decimal operationCount, string workID)
        {
            IToolsManage serverTools = ServerModule.ServerModuleFactory.GetServerModule <IToolsManage>();

            if (serverTools.IsTools(goodsID))
            {
                Service_Manufacture_WorkShop.IWorkShopBasic serverWSBasic =
                    Service_Manufacture_WorkShop.ServerModuleFactory.GetServerModule <Service_Manufacture_WorkShop.IWorkShopBasic>();
                IPersonnelInfoServer serverPersonnel = ServerModuleFactory.GetServerModule <IPersonnelInfoServer>();

                View_HR_Personnel viewPersonnel = serverPersonnel.GetPersonnelInfo(workID);
                WS_WorkShopCode   tempWSCode    = serverWSBasic.GetPersonnelWorkShop(workID);

                S_MachineAccount_Tools toolsInfo = new S_MachineAccount_Tools();

                toolsInfo.GoodsID    = goodsID;
                toolsInfo.Provider   = provider;
                toolsInfo.StockCount = -operationCount;

                if (tempWSCode != null)
                {
                    toolsInfo.StorageCode = tempWSCode.WSCode;
                }
                else
                {
                    toolsInfo.StorageCode = viewPersonnel.部门编码;
                }

                serverTools.OpertionInfo(ctx, toolsInfo);
                serverTools.DayToDayAccount(ctx, toolsInfo, billNo);
            }
        }
        /// <summary>
        /// 赋值账务信息
        /// </summary>
        /// <param name="dataContext">数据上下文</param>
        /// <param name="bill">单据信息</param>
        /// <param name="item">明细信息</param>
        /// <returns>返回账务信息</returns>
        public S_InDepotDetailBill AssignDetailInfo(DepotManagementDataContext dataContext, S_OrdinaryInDepotBill bill,
                                                    S_OrdinaryInDepotGoodsBill item)
        {
            IPersonnelInfoServer personnelServer = ServerModuleFactory.GetServerModule <IPersonnelInfoServer>();

            S_InDepotDetailBill  detailBill     = new S_InDepotDetailBill();
            View_HR_Personnel    personnel      = UniversalFunction.GetPersonnelInfo(dataContext, bill.BuyerCode);
            View_F_GoodsPlanCost basicGoodsInfo = UniversalFunction.GetGoodsInfo(dataContext, item.GoodsID);

            detailBill.ID              = Guid.NewGuid();
            detailBill.BillTime        = (DateTime)bill.InDepotDate;
            detailBill.FillInPersonnel = personnel.姓名;
            detailBill.Department      = personnel.部门名称;
            detailBill.FactPrice       = Math.Round((item.UnitPrice * (decimal)item.Amount), 2);
            detailBill.FactUnitPrice   = item.UnitPrice;
            detailBill.GoodsID         = item.GoodsID;
            detailBill.BatchNo         = item.BatchNo;
            detailBill.InDepotBillID   = bill.Bill_ID;
            detailBill.InDepotCount    = item.Amount;
            detailBill.Price           = Math.Round((item.UnitPrice * (decimal)item.Amount), 2);
            detailBill.UnitPrice       = item.UnitPrice;
            detailBill.OperationType   = (int)GlobalObject.CE_SubsidiaryOperationType.普通入库;
            detailBill.Provider        = bill.Provider;
            detailBill.StorageID       = bill.StorageID;
            detailBill.AffrimPersonnel = UniversalFunction.GetPersonnelInfo(bill.DepotManager).姓名;
            detailBill.FillInDate      = bill.Bill_Time;

            return(detailBill);
        }
        /// <summary>
        /// 赋值账务信息
        /// </summary>
        /// <param name="ctx">数据上下文</param>
        /// <param name="bill">单据信息</param>
        /// <param name="item">明细信息</param>
        /// <returns>返回账务信息</returns>
        S_InDepotDetailBill AssignDetailInfo(DepotManagementDataContext ctx, S_FrockInDepotBill bill, S_FrockInDepotGoodsBill item)
        {
            IPersonnelInfoServer serverPersonnelInfo = ServerModuleFactory.GetServerModule <IPersonnelInfoServer>();
            View_HR_Personnel    lnqPersonnel        = UniversalFunction.GetPersonnelInfo(ctx, bill.JJRYID);
            S_InDepotDetailBill  lnqDetailBill       = new S_InDepotDetailBill();

            View_F_GoodsPlanCost lnqBasicGoodsInfo = UniversalFunction.GetGoodsInfo(ctx, item.GoodsID);

            lnqDetailBill.ID              = Guid.NewGuid();
            lnqDetailBill.BillTime        = (DateTime)bill.InDepotDate;
            lnqDetailBill.FillInPersonnel = lnqPersonnel.姓名;
            lnqDetailBill.Department      = lnqPersonnel.部门名称;
            lnqDetailBill.FactPrice       = 0;
            lnqDetailBill.FactUnitPrice   = 0;
            lnqDetailBill.GoodsID         = item.GoodsID;
            lnqDetailBill.BatchNo         = item.BatchNo;
            lnqDetailBill.InDepotBillID   = bill.Bill_ID;
            lnqDetailBill.InDepotCount    = item.Amount;
            lnqDetailBill.Price           = 0;
            lnqDetailBill.UnitPrice       = 0;
            lnqDetailBill.OperationType   = (int)CE_SubsidiaryOperationType.自制件工装入库;
            lnqDetailBill.Provider        = bill.Provider;
            lnqDetailBill.StorageID       = bill.StorageID;
            lnqDetailBill.AffrimPersonnel = bill.DepotManager;
            lnqDetailBill.FillInDate      = bill.Bill_Time;

            return(lnqDetailBill);
        }
Exemple #4
0
        private void 提交单据ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (lblBillStatus.Text != OrdinaryInDepotBillStatus.新建单据.ToString())
            {
                MessageDialog.ShowPromptMessage("您现在不是处于新建单据状态,无法提交");
                return;
            }

            if (!CheckSelectedRow())
            {
                return;
            }

            string billNo = dataGridView1.CurrentRow.Cells[0].Value.ToString();

            if (!m_billServer.IsExist(billNo))
            {
                MessageDialog.ShowPromptMessage("您还未设置物品清单,无法提交");
                return;
            }

            IPersonnelInfoServer server = ServerModuleFactory.GetServerModule <IPersonnelInfoServer>();
            CE_RoleEnum          role   = CE_RoleEnum.工装管理员;
            string flowMsg = null;

            if (!m_billServer.SubmitNewBill(billNo, m_blFlag, out m_queryResult, out m_strErr))
            {
                MessageDialog.ShowErrorMessage(m_strErr);
                return;
            }

            m_billMessageServer.DestroyMessage(billNo);
            SendNewFlowMessage(billNo, role, flowMsg);
            RefreshDataGridView(m_queryResult);
            PositioningRecord(billNo);

            MessageDialog.ShowPromptMessage("【" + billNo + "】号单据提交成功!");
        }
        private void 采购员提交单据ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (lblBillStatus.Text != OrdinaryInDepotBillStatus.新建单据.ToString())
            {
                MessageDialog.ShowPromptMessage("您现在不是处于新建单据状态,无法提交");
                return;
            }

            if (!CheckSelectedRow())
            {
                return;
            }

            if (!CheckDataItem())
            {
                return;
            }

            if (!CheckUserOperation(dataGridView1.SelectedRows[0]))
            {
                return;
            }

            string billNo = txtBill_ID.Text;

            if (!m_goodsServer.IsExist(billNo))
            {
                MessageDialog.ShowPromptMessage("您还未设置物品清单,无法提交");
                return;
            }

            IPersonnelInfoServer      server = ServerModuleFactory.GetServerModule <IPersonnelInfoServer>();
            OrdinaryInDepotBillStatus status;
            CE_RoleEnum role;

            string flowMsg = null;
            string msg     = null;


            if (txtMaterialType.Text == CE_GoodsType.工装.ToString())
            {
                msg     = "成功提交,等待工艺人员检验!";
                role    = CE_RoleEnum.未知;//工艺人员要求不看信息
                status  = OrdinaryInDepotBillStatus.等待工装验证报告;
                flowMsg = string.Format("【订单号】:{0} 【物品申请人】:{1}   ※※※ 等待【工艺人员】处理",
                                        txtOrderFormNumber.Text, txtProposer.Text);
            }
            else
            {
                if (chkQualityAffirmance.Checked)
                {
                    msg     = "成功提交,等待质量验收!";
                    role    = CE_RoleEnum.检验员;
                    status  = OrdinaryInDepotBillStatus.等待质检;
                    flowMsg = string.Format("【订单号】:{0} 【物品申请人】:{1}   ※※※ 等待【质检员】处理",
                                            txtOrderFormNumber.Text, txtProposer.Text);
                }
                else
                {
                    msg     = "成功提交,等待仓管入库!";
                    role    = m_billMessageServer.GetRoleStringForStorage(cmbStorage.Text);
                    status  = OrdinaryInDepotBillStatus.等待入库;
                    flowMsg = string.Format("【订单号】:{0} 【物品申请人】:{1}   ※※※ 等待【仓管员】处理",
                                            txtOrderFormNumber.Text, txtProposer.Text);
                }
            }

            if (!m_billServer.SubmitNewBill(billNo, status, out m_queryResult, out m_error))
            {
                MessageDialog.ShowErrorMessage(m_error);
                return;
            }

            m_billMessageServer.DestroyMessage(billNo);
            SendNewFlowMessage(billNo, role, flowMsg);
            RefreshDataGridView(m_queryResult);
            PositioningRecord(billNo);

            MessageDialog.ShowPromptMessage(msg);
        }
        /// <summary>
        /// 获取服务组件
        /// </summary>
        /// <returns>返回组件接口</returns>
        public static T GetServerModule <T>()
        {
            string name = typeof(T).ToString();

            m_hashTable = new Hashtable();

            //if (m_hashTable.ContainsKey(name))
            //{
            //    return (T)m_hashTable[name];
            //}

            if (typeof(T) == typeof(IProviderServer))
            {
                IProviderServer serverModule = new ProviderServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IAccessoryDutyInfoManageServer))
            {
                IAccessoryDutyInfoManageServer serverModule = new AccessoryDutyInfoManageServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IDepartmentServer))
            {
                IDepartmentServer serverModule = new DepartmentServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IMaterialTypeServer))
            {
                IMaterialTypeServer serverModule = new MaterialTypeServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IStoreServer))
            {
                IStoreServer serverModule = new StoreServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(ICheckOutInDepotServer))
            {
                ICheckOutInDepotServer serverModule = new CheckOutInDepotServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IUnitServer))
            {
                IUnitServer serverModule = new UnitServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IClientServer))
            {
                IClientServer serverModule = new ClientServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IProductListServer))
            {
                IProductListServer serverModule = new ProductListServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IBasicGoodsServer))
            {
                IBasicGoodsServer serverModule = SCM_Level01_ServerFactory.GetServerModule <IBasicGoodsServer>();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IAssemblyInfoServer))
            {
                IAssemblyInfoServer serverModule = PMS_ServerFactory.GetServerModule <IAssemblyInfoServer>();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IBarCodeServer))
            {
                IBarCodeServer serverModule = BasicServerFactory.GetServerModule <IBarCodeServer>();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IBomServer))
            {
                IBomServer serverModule = PMS_ServerFactory.GetServerModule <IBomServer>();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IBomMappingServer))
            {
                IBomMappingServer serverModule = PMS_ServerFactory.GetServerModule <IBomMappingServer>();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IAssemblingBom))
            {
                IAssemblingBom serverModule = PMS_ServerFactory.GetServerModule <IAssemblingBom>();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IElectronFileServer))
            {
                IElectronFileServer serverModule = PMS_ServerFactory.GetServerModule <IElectronFileServer>();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IChoseConfectServer))
            {
                IChoseConfectServer serverModule = PMS_ServerFactory.GetServerModule <IChoseConfectServer>();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IWorkbenchService))
            {
                IWorkbenchService serverModule = PMS_ServerFactory.GetServerModule <IWorkbenchService>();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IGoodsGradeServer))
            {
                IGoodsGradeServer serverModule = new GoodsGradeServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IBargainInfoServer))
            {
                IBargainInfoServer serverModule = new BargainInfoServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IBargainGoodsServer))
            {
                IBargainGoodsServer serverModule = new BargainGoodsServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IOrderFormInfoServer))
            {
                IOrderFormInfoServer serverModule = new OrderFormInfoServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IOrderFormGoodsServer))
            {
                IOrderFormGoodsServer serverModule = new OrderFormGoodsServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IOrdinaryInDepotBillServer))
            {
                IOrdinaryInDepotBillServer serverModule = new OrdinaryInDepotBillServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IOrdinaryInDepotGoodsBill))
            {
                IOrdinaryInDepotGoodsBill serverModule = new OrdinaryInDepotGoodsBill();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IProductInfoServer))
            {
                IProductInfoServer serverModule = PMS_ServerFactory.GetServerModule <IProductInfoServer>();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IBillTypeServer))
            {
                IBillTypeServer serverModule = BasicServerFactory.GetServerModule <IBillTypeServer>();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IAssignBillNoServer))
            {
                IAssignBillNoServer serverModule = BasicServerFactory.GetServerModule <IAssignBillNoServer>();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IMaterialRequisitionServer))
            {
                IMaterialRequisitionServer serverModule = new MaterialRequisitionServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IPersonnelInfoServer))
            {
                IPersonnelInfoServer serverModule = SCM_Level01_ServerFactory.GetServerModule <IPersonnelInfoServer>();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IMaterialRequisitionGoodsServer))
            {
                IMaterialRequisitionGoodsServer serverModule = new MaterialRequisitionGoodsServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IDeclareWastrelType))
            {
                IDeclareWastrelType serverModule = new DeclareWastrelType();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IScrapBillServer))
            {
                IScrapBillServer serverModule = new ScrapBillServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IScrapGoodsServer))
            {
                IScrapGoodsServer serverModule = new ScrapGoodsServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IMaterialRequisitionPurposeServer))
            {
                IMaterialRequisitionPurposeServer serverModule = new MaterialRequisitionPurposeServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IFieldWidthServer))
            {
                IFieldWidthServer serverModule = new FieldWidthServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IHomemadePartInDepotServer))
            {
                IHomemadePartInDepotServer serverModule = new HomemadePartInDepotServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IMaterialReturnedInTheDepot))
            {
                IMaterialReturnedInTheDepot serverModule = new MaterialReturnedInTheDepot();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IMaterialListReturnedInTheDepot))
            {
                IMaterialListReturnedInTheDepot serverModule = new MaterialListReturnedInTheDepot();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IMaterialRejectBill))
            {
                IMaterialRejectBill serverModule = new MaterialRejectBill();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IMaterialListRejectBill))
            {
                IMaterialListRejectBill serverModule = new MaterialListRejectBill();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IDetailSummaryInfo))
            {
                IDetailSummaryInfo serverModule = new DetailSummaryInfo();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IDepotTypeForPersonnel))
            {
                IDepotTypeForPersonnel serverModule = SCM_Level01_ServerFactory.GetServerModule <IDepotTypeForPersonnel>();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IInvoiceServer))
            {
                IInvoiceServer serverModule = new InvoiceServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(ISellIn))
            {
                ISellIn serverModule = new SellIn();
                m_hashTable.Add(name, serverModule);
            }
            //else if (typeof(T) == typeof(IProductOrder))
            //{
            //    IProductOrder serverModule = new ProductOrder();
            //    m_hashTable.Add(name, serverModule);
            //}
            else if (typeof(T) == typeof(ICannibalize))
            {
                ICannibalize serverModule = new Cannibalize();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(ICheckReturnRepair))
            {
                ICheckReturnRepair serverModule = new CheckReturnRepair();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IIsolationManageBill))
            {
                IIsolationManageBill serverModule = new IsolationManageBill();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IMessMessageFeedback))
            {
                IMessMessageFeedback serverModule = new MessMessageFeedback();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(ITorqueConverterInfoServer))
            {
                ITorqueConverterInfoServer serverModule = new TorqueConverterInfoServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IProductPlan))
            {
                IProductPlan serverModule = new ProductPlan();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IStoreageCheck))
            {
                IStoreageCheck serverModule = new StoreageCheck();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(ISafeStockServer))
            {
                ISafeStockServer serverModule = new SafeStockServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IMusterAffirmBill))
            {
                IMusterAffirmBill serverModule = new MusterAffirmBill();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IMusterUse))
            {
                IMusterUse serverModule = new MusterUse();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(ITempElectronFileServer))
            {
                ITempElectronFileServer serverModule = PMS_ServerFactory.GetServerModule <ITempElectronFileServer>();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IMultiBatchPartServer))
            {
                IMultiBatchPartServer serverModule = PMS_ServerFactory.GetServerModule <IMultiBatchPartServer>();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(ITechnologyChange))
            {
                ITechnologyChange serverModule = new TechnologyChange();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IGoodsLeastPackAndStock))
            {
                IGoodsLeastPackAndStock serverModule = new GoodsLeastPackAndStock();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IOrderFormAffrim))
            {
                IOrderFormAffrim serverModule = new OrderFormAffrim();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IMarketingPlan))
            {
                IMarketingPlan serverModule = new MarketingPlan();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IPurcharsingPlan))
            {
                IPurcharsingPlan serverModule = new PurcharsingPlan();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IGeneratesCheckOutInDepotServer))
            {
                IGeneratesCheckOutInDepotServer serverModule = new GeneratesCheckOutInDepotServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IGoodsAntirust))
            {
                IGoodsAntirust serverModule = new GoodsAntirust();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IQuarantine))
            {
                IQuarantine serverModule = new Quarantine();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IAfterServiceMakePartsBill))
            {
                IAfterServiceMakePartsBill serverModule = new AfterServiceMakePartsBill();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IReparativePartInfoServer))
            {
                IReparativePartInfoServer serverModule = PMS_ServerFactory.GetServerModule <IReparativePartInfoServer>();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IConvertCVTNumber))
            {
                IConvertCVTNumber serverModule = PMS_ServerFactory.GetServerModule <IConvertCVTNumber>();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IProductBarcodeServer))
            {
                IProductBarcodeServer serverModule = PMS_ServerFactory.GetServerModule <IProductBarcodeServer>();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(ICheckOutInDepotForOutsourcingServer))
            {
                ICheckOutInDepotForOutsourcingServer serverModule = new CheckOutInDepotForOutsourcingServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IProductChange))
            {
                IProductChange serverModule = new ProductChange();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IHomemadeRejectBill))
            {
                IHomemadeRejectBill serverModule = new HomemadeRejectBill();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IHomemadeRejectList))
            {
                IHomemadeRejectList serverModule = new HomemadeRejectList();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IFrockProvingReport))
            {
                IFrockProvingReport serverModule = new FrockProvingReport();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IMaterialDetainBill))
            {
                IMaterialDetainBill serverModule = new MaterialDetainBill();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IPrintProductBarcodeInfo))
            {
                IPrintProductBarcodeInfo serverModule = PMS_ServerFactory.GetServerModule <IPrintProductBarcodeInfo>();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IThreePacketsOfTheRepairBill))
            {
                IThreePacketsOfTheRepairBill serverModule = new ThreePacketsOfTheRepairBill();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IFrockIndepotBill))
            {
                IFrockIndepotBill serverModule = new FrockIndepotBill();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(ICommunicateReportBill))
            {
                ICommunicateReportBill serverModule = new CommunicateReportBill();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IProductCodeServer))
            {
                IProductCodeServer serverModule = SCM_Level02_ServerFactory.GetServerModule <IProductCodeServer>();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IHomemadePartInfoServer))
            {
                IHomemadePartInfoServer serverModule = new HomemadePartInfoServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IStorageInfo))
            {
                IStorageInfo serverModule = new StorageInfo();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IProductDeliveryInspectionServer))
            {
                IProductDeliveryInspectionServer serverModule = new ProductDeliveryInspectionServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(ICVTCustomerInformationServer))
            {
                ICVTCustomerInformationServer serverModule = new CVTCustomerInformationServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(ICVTTruckLoadingInformation))
            {
                ICVTTruckLoadingInformation serverModule = new CVTTruckLoadingInformation();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IQualityProblemRectificationDisposalBill))
            {
                IQualityProblemRectificationDisposalBill serverModule = new QualityProblemRectificationDisposalBill();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IGoodsShelfLife))
            {
                IGoodsShelfLife serverModule = new GoodsShelfLife();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IReport))
            {
                IReport serverModule = new Report();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IMarqueeServer))
            {
                IMarqueeServer serverModule = new MarqueeServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IDeviceMaintenanceBill))
            {
                IDeviceMaintenanceBill serverModule = new DeviceMaintenanceBill();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(ICBOMServer))
            {
                ICBOMServer serverModule = new CBOMServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(ILogisticSafeStock))
            {
                ILogisticSafeStock serverModule = new LogisticSafeStock();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IUnProductTestingSingle))
            {
                IUnProductTestingSingle serverModule = new UnProductTestingSingle();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IDisposableGoodsServer))
            {
                IDisposableGoodsServer serverModule = new DisposableGoodsServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(ITCURepairInfoServer))
            {
                ITCURepairInfoServer serverModule = new TCURepairInfoServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(ISalesOrderServer))
            {
                ISalesOrderServer serverModule = new SalesOrderServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(ITechnologyAlteration))
            {
                ITechnologyAlteration serverModule = new TechnologyAlteration();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IMinorPurchaseBillServer))
            {
                IMinorPurchaseBillServer serverModule = new MinorPurchaseBillServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IProductLendService))
            {
                IProductLendService serverModule = new ProductLendService();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IProductLendReturnService))
            {
                IProductLendReturnService serverModule = new ProductLendReturnService();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IProductReturnService))
            {
                IProductReturnService serverModule = new ProductReturnService();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IStockLack))
            {
                IStockLack serverModule = new StockLack();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IOfflineFailSafeServer))
            {
                IOfflineFailSafeServer serverModule = new OfflineFailSafeServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(ISystemLogServer))
            {
                ISystemLogServer serverModule = new SystemLogServer();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IFinancialDetailManagement))
            {
                IFinancialDetailManagement serverModule = new FinancialDetailManagement();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IToolsManage))
            {
                IToolsManage serverModule = new ToolsManage();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IGaugeManage))
            {
                IGaugeManage serverModule = new GaugeManage();
                m_hashTable.Add(name, serverModule);
            }
            else if (typeof(T) == typeof(IQualitySystemDatabase))
            {
                IQualitySystemDatabase serverModule = new QualitySystemDatabase();
                m_hashTable.Add(name, serverModule);
            }

            if (m_hashTable.ContainsKey(name))
            {
                return((T)m_hashTable[name]);
            }

            return(default(T));
        }