Beispiel #1
0
        public void Save(MES_M202_Task_Detail taskDetail, List <MES_M202_Task_JobLot> taskJobLotList)
        {
            tb_Sys_User tempUser   = appCacheService.GetItem("user") as tb_Sys_User;
            var         existstemp = this.GetById(taskDetail.Id);

            if (existstemp == null)
            {
                taskDetail.CompCode   = tempUser.CompCode;
                taskDetail.CreateDt   = DateTime.Now;
                taskDetail.CreateUser = tempUser.UserName;
                taskDetail.Validate();
                this.MES_M202_Task_DetailRepository.Add(taskDetail);
            }
            else
            {
                taskDetail.ModifyDt   = DateTime.Now;
                taskDetail.ModifyUser = tempUser.UserName;
                taskDetail.Validate();
                this.MES_M202_Task_DetailRepository.SetValues(taskDetail, existstemp);
            }
            if (taskJobLotList != null)
            {
                string sql = string.Format("Delete MES_M202_Task_JobLot where JobNo = '{0}'", taskDetail.TaskNo);
                taskJobLotRepository.GetDbContext().Database.ExecuteSqlCommand(sql);
                foreach (var taskJobLot in taskJobLotList)
                {
                    taskJobLot.JobNo    = taskDetail.TaskNo;
                    taskJobLot.CompCode = tempUser.CompCode;
                    taskJobLot.Validate();
                    this.taskJobLotRepository.Add(taskJobLot);
                }
            }
            this.runtimeService.Commit();
        }
        public void Create(WMS_MatConsume_ActMatDetail WMS_MatConsume_ActMatDetail)
        {
            tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User;

            WMS_MatConsume_ActMatDetail.Validate();
            this.WMS_MatConsume_ActMatDetailRepository.Add(WMS_MatConsume_ActMatDetail);
            this.runtimeService.Commit();
        }
Beispiel #3
0
        public void Create(MES_M801_Label_S MES_M801_Label_S)
        {
            tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User;

            MES_M801_Label_S.Validate();
            this.MES_M801_Label_SRepository.Add(MES_M801_Label_S);
            this.runtimeService.Commit();
        }
Beispiel #4
0
        public void IntitData()
        {
            tb_Sys_Menu  menuInfo = appCacheService.GetItem("ParentMenu") as tb_Sys_Menu;
            tb_Sys_Roles role     = appCacheService.GetItem("roles") as tb_Sys_Roles;

            //Guid MenuId =
            gridControl1.DataSource = menuService.GetMenusByRoleId(role.Id).Where(i => i.ParentMenuId == menuInfo.Id).OrderBy(i => i.SeqNo);
        }
        public void Create(ERP_C006_ProcessFlow_ProdInfo ERP_C006_ProcessFlow_ProdInfo)
        {
            tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User;

            ERP_C006_ProcessFlow_ProdInfo.CompCode = tempUser.CompCode;
            ERP_C006_ProcessFlow_ProdInfo.Validate();
            this.ERP_C006_ProcessFlow_ProdInfoRepository.Add(ERP_C006_ProcessFlow_ProdInfo);
            this.runtimeService.Commit();
        }
Beispiel #6
0
        public void Create(WMS_M002_StockTx WMS_M002_StockTx)
        {
            WMS_M002_StockTx.CreateDt = DateTime.Now;
            tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User;

            WMS_M002_StockTx.CreateUser = tempUser.UserName;
            WMS_M002_StockTx.Validate();
            this.WMS_M002_StockTxRepository.Add(WMS_M002_StockTx);
            this.runtimeService.Commit();
        }
Beispiel #7
0
        public void Create(ERP_M002_BOM_Material ERP_M002_BOM_Material)
        {
            ERP_M002_BOM_Material.CreateDt = DateTime.Now;
            tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User;

            ERP_M002_BOM_Material.CreateUser = tempUser.UserName;
            ERP_M002_BOM_Material.Validate();
            this.ERP_M002_BOM_MaterialRepository.Add(ERP_M002_BOM_Material);
            this.runtimeService.Commit();
        }
Beispiel #8
0
        public void Create(MES_M003_LotTx_NG_Clone MES_M003_LotTx_NG_Clone)
        {
            MES_M003_LotTx_NG_Clone.CreateDt = DateTime.Now;
            tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User;

            MES_M003_LotTx_NG_Clone.CreateUser = tempUser.UserName;
            MES_M003_LotTx_NG_Clone.Validate();
            this.MES_M003_LotTx_NG_CloneRepository.Add(MES_M003_LotTx_NG_Clone);
            this.runtimeService.Commit();
        }
Beispiel #9
0
        public void Create(ERP_C002_Company tb_C001_Company)
        {
            tb_C001_Company.Validate();
            tb_C001_Company.CreateDt = DateTime.Now;
            tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User;

            tb_C001_Company.CreateUser = tempUser.UserName;
            this.tb_C001_CompanyRepository.Add(tb_C001_Company);
            this.runtimeService.Commit();
        }
        public void Create(ERP_C006_ProcessFlow_Process ERP_C006_ProcessFlow_Process)
        {
            ERP_C006_ProcessFlow_Process.CreateDt = DateTime.Now;
            tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User;

            ERP_C006_ProcessFlow_Process.CreateUser = tempUser.UserName;
            ERP_C006_ProcessFlow_Process.Validate();
            this.ERP_C006_ProcessFlow_ProcessRepository.Add(ERP_C006_ProcessFlow_Process);
            this.runtimeService.Commit();
        }
Beispiel #11
0
        public void Create(MES_M801_Label_L MES_M801_Label_L)
        {
            MES_M801_Label_L.CreateDt = DateTime.Now;
            tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User;

            MES_M801_Label_L.CreateUser = tempUser.UserName;
            MES_M801_Label_L.Validate();
            this.MES_M801_Label_LRepository.Add(MES_M801_Label_L);
            this.runtimeService.Commit();
        }
Beispiel #12
0
        public void Create(ESOP_DocIndex ESOP_DocIndex)
        {
            ESOP_DocIndex.CreateDt = DateTime.Now;
            tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User;

            ESOP_DocIndex.CreateUser = tempUser.UserName;
            ESOP_DocIndex.Validate();
            this.ESOP_DocIndexRepository.Add(ESOP_DocIndex);
            this.runtimeService.Commit();
        }
Beispiel #13
0
        public void Create(tb_Sys_RolesControl tb_Sys_RolesControl)
        {
            tb_Sys_RolesControl.CreateDt = DateTime.Now;
            tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User;

            tb_Sys_RolesControl.CreateUser = tempUser.UserName;
            tb_Sys_RolesControl.Validate();
            this.tb_Sys_RolesControlRepository.Add(tb_Sys_RolesControl);
            this.runtimeService.Commit();
        }
Beispiel #14
0
        public void Create(MES_M004_PlanJob MES_M004_PlanJob)
        {
            MES_M004_PlanJob.CreateDt = DateTime.Now;
            tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User;

            MES_M004_PlanJob.CreateUser = tempUser.UserName;
            MES_M004_PlanJob.Validate();
            this.MES_M004_PlanJobRepository.Add(MES_M004_PlanJob);
            this.runtimeService.Commit();
        }
Beispiel #15
0
        public void Create(WMS_M104_Packing_Hd WMS_M104_Packing_Hd)
        {
            WMS_M104_Packing_Hd.CreateDt = DateTime.Now;
            tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User;

            WMS_M104_Packing_Hd.CreateUser = tempUser.UserName;
            WMS_M104_Packing_Hd.Validate();
            this.WMS_M104_Packing_HdRepository.Add(WMS_M104_Packing_Hd);
            this.runtimeService.Commit();
        }
Beispiel #16
0
        public void Create(MES_M501_JobTx_NG MES_M501_JobTx_NG)
        {
            MES_M501_JobTx_NG.CreateDt = DateTime.Now;
            tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User;

            MES_M501_JobTx_NG.CreateUser = tempUser.UserName;
            MES_M501_JobTx_NG.Validate();
            this.MES_M501_JobTx_NGRepository.Add(MES_M501_JobTx_NG);
            this.runtimeService.Commit();
        }
Beispiel #17
0
        public void Create(ESOP_Product ESOP_Product)
        {
            ESOP_Product.CreateDt = DateTime.Now;
            tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User;

            ESOP_Product.CreateUser = tempUser.UserName;
            ESOP_Product.Validate();
            this.productRepository.Add(ESOP_Product);
            this.runtimeService.Commit();
        }
Beispiel #18
0
        public void Create(MES_M201_Plan_Material MES_M201_Plan_Material)
        {
            MES_M201_Plan_Material.CreateDt = DateTime.Now;
            tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User;

            MES_M201_Plan_Material.CreateUser = tempUser.UserName;
            MES_M201_Plan_Material.Validate();
            this.MES_M201_Plan_MaterialRepository.Add(MES_M201_Plan_Material);
            this.runtimeService.Commit();
        }
        public void Create(ERP_M001_Product_ProdInfo ERP_M001_Product_ProdInfo)
        {
            ERP_M001_Product_ProdInfo.CreateDt = DateTime.Now;
            tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User;

            ERP_M001_Product_ProdInfo.CreateUser = tempUser.UserName;
            ERP_M001_Product_ProdInfo.Validate();
            this.ERP_M001_Product_ProdInfoRepository.Add(ERP_M001_Product_ProdInfo);
            this.runtimeService.Commit();
        }
        public void Create(SUPP_M001_PurPlan_Detail SUPP_M001_PurPlan_Detail)
        {
            SUPP_M001_PurPlan_Detail.CreateDt = DateTime.Now;
            tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User;

            SUPP_M001_PurPlan_Detail.CreateUser = tempUser.UserName;
            SUPP_M001_PurPlan_Detail.Validate();
            this.SUPP_M001_PurPlan_DetailRepository.Add(SUPP_M001_PurPlan_Detail);
            this.runtimeService.Commit();
        }
Beispiel #21
0
        public void Create(DEV_D001_Device DEV_D001_Device)
        {
            DEV_D001_Device.CreateDt = DateTime.Now;
            tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User;

            DEV_D001_Device.CreateUser = tempUser.UserName;
            DEV_D001_Device.Validate();
            this.DEV_D001_DeviceRepository.Add(DEV_D001_Device);
            this.runtimeService.Commit();
        }
Beispiel #22
0
        public void Create(WMS_MatConsume_ActMat WMS_MatConsume_ActMat)
        {
            WMS_MatConsume_ActMat.CreatDt = DateTime.Now;
            tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User;

            WMS_MatConsume_ActMat.CreateUser = tempUser.UserName;
            WMS_MatConsume_ActMat.Validate();
            this.WMS_MatConsume_ActMatRepository.Add(WMS_MatConsume_ActMat);
            this.runtimeService.Commit();
        }
        public void Create(MES_M002_Job_Lot_Process MES_M002_Job_Lot_Process)
        {
            MES_M002_Job_Lot_Process.CreateDt = DateTime.Now;
            tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User;

            MES_M002_Job_Lot_Process.CreateUser = tempUser.UserName;
            MES_M002_Job_Lot_Process.Validate();
            this.MES_M002_Job_Lot_ProcessRepository.Add(MES_M002_Job_Lot_Process);
            this.runtimeService.Commit();
        }
        public void Create(WMS_M105_MatReturnDetail WMS_M105_MatReturnDetail)
        {
            WMS_M105_MatReturnDetail.CreateDt = DateTime.Now;
            tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User;

            WMS_M105_MatReturnDetail.CreateUser = tempUser.UserName;
            WMS_M105_MatReturnDetail.Validate();
            this.WMS_M105_MatReturnDetailRepository.Add(WMS_M105_MatReturnDetail);
            this.runtimeService.Commit();
        }
Beispiel #25
0
        public void Create(ERP_M003_InStore ERP_M003_InStore)
        {
            ERP_M003_InStore.CreateDt = DateTime.Now;
            tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User;

            ERP_M003_InStore.CreateUser = tempUser.UserName;
            ERP_M003_InStore.Validate();
            this.ERP_M003_InStoreRepository.Add(ERP_M003_InStore);
            this.runtimeService.Commit();
        }
Beispiel #26
0
        public void Create(WMS_C101_WareHouse WMS_C101_WareHouse)
        {
            WMS_C101_WareHouse.CreateDt = DateTime.Now;
            tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User;

            WMS_C101_WareHouse.CreateUser = tempUser.UserName;
            WMS_C101_WareHouse.Validate();
            this.WMS_C101_WareHouseRepository.Add(WMS_C101_WareHouse);
            this.runtimeService.Commit();
        }
Beispiel #27
0
        public void Create(tb_Sys_Controls tb_Sys_Controls)
        {
            tb_Sys_Controls.CreateDt = DateTime.Now;
            tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User;

            tb_Sys_Controls.CreateUser = tempUser.UserName;
            tb_Sys_Controls.CompCode   = tempUser.CompCode;
            tb_Sys_Controls.Validate();
            this.tb_Sys_ControlsRepository.Add(tb_Sys_Controls);
            this.runtimeService.Commit();
        }
Beispiel #28
0
        public void Create(ERP_C005_Employee tb_C005_Employee)
        {
            tb_C005_Employee.CreateDt = DateTime.Now;
            tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User;

            tb_C005_Employee.CreateUser = tempUser.UserName;
            tb_C005_Employee.CompCode   = tempUser.CompCode;
            tb_C005_Employee.Validate();
            this.tb_C005_EmployeeRepository.Add(tb_C005_Employee);
            this.runtimeService.Commit();
        }
        public void Create(ERP_C001_CodeDictionary ERP_C001_CodeDictionary)
        {
            ERP_C001_CodeDictionary.CreateDt = DateTime.Now;
            tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User;

            ERP_C001_CodeDictionary.CreateUser = tempUser.UserName;
            ERP_C001_CodeDictionary.CompCode   = tempUser.CompCode;
            ERP_C001_CodeDictionary.Validate();
            this.ERP_C001_CodeDictionaryRepository.Add(ERP_C001_CodeDictionary);
            this.runtimeService.Commit();
        }
Beispiel #30
0
        public void Createtb_Sys_Roles(tb_Sys_Roles tb_Sys_Roles)
        {
            tb_Sys_Roles.Validate();
            tb_Sys_Roles.CreateTime = DateTime.Now;
            tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User;

            tb_Sys_Roles.CreateUser = tempUser.UserName;
            tb_Sys_Roles.Validate();
            this.tb_Sys_RolesRepository.Add(tb_Sys_Roles);
            this.runtimeService.Commit();
        }