예제 #1
0
        public override ValueObject Execute(TransactionContext trxContext, ValueObject vo)
        {
            GroupMachineVo inVo = (GroupMachineVo)vo;
            StringBuilder  sql  = new StringBuilder();

            sql.Append("update m_group_machine set group_machine_cd=:group_machine_cd,group_machine_name=:group_machine_name,machine_id=:machine_id");
            sql.Append(" where group_machine_id =:group_machine_id");

            //create command
            DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sql.ToString());

            //create parameter
            DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList();

            sqlParameter.AddParameterString("group_machine_cd", inVo.GroupMachineCode);
            sqlParameter.AddParameterString("group_machine_name", inVo.GroupMachineName);
            sqlParameter.AddParameterInteger("group_machine_id", inVo.GroupMachineId);
            sqlParameter.AddParameterInteger("machine_id", inVo.MachineId);

            sqlParameter.AddParameterString("factory_cd", inVo.FactoryCode);
            sqlParameter.AddParameterString("registration_user_cd", inVo.RegistrationUserCode);
            //execute SQL

            GroupMachineVo outVo = new GroupMachineVo
            {
                AffectedCount = sqlCommandAdapter.ExecuteNonQuery(sqlParameter)
            };

            return(outVo);
        }
예제 #2
0
        public override ValueObject Execute(TransactionContext trxContext, ValueObject arg)
        {
            StockLocationVo inVo = (StockLocationVo)arg;

            StockLocationVo outVo = new StockLocationVo();

            StringBuilder sqlQuery = new StringBuilder();

            sqlQuery.Append("Update m_stock_location");
            sqlQuery.Append(" Set ");
            sqlQuery.Append(" stock_location_name = :stock_locationname, ");
            sqlQuery.Append(" location_type = :locationtype, ");
            sqlQuery.Append(" display_order = :displayorder ");
            sqlQuery.Append(" Where	");
            sqlQuery.Append(" stock_location_id = :stock_locationid ");
            sqlQuery.Append(" and factory_cd = :faccd ;");
            //create command
            DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sqlQuery.ToString());

            //create parameter
            DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList();

            sqlParameter.AddParameterInteger("stock_locationid", inVo.StockLocationId);
            sqlParameter.AddParameterString("stock_locationname", inVo.StockLocationName);
            sqlParameter.AddParameterInteger("locationtype", inVo.LocationType);
            sqlParameter.AddParameterInteger("displayorder", inVo.DisplayOrder);
            sqlParameter.AddParameterString("faccd", UserData.GetUserData().FactoryCode);
            //execute SQL
            outVo.AffectedCount = sqlCommandAdapter.ExecuteNonQuery(sqlParameter);

            return(outVo);
        }
        public override ValueObject Execute(TransactionContext trxContext, ValueObject arg)
        {
            InspectionItemSelectionDatatypeValueVo inVo = (InspectionItemSelectionDatatypeValueVo)arg;

            StringBuilder sqlQuery = new StringBuilder();

            sqlQuery.Append("Update m_inspection_item_selection_datatype_value");
            sqlQuery.Append(" Set ");
            sqlQuery.Append(" inspection_item_selection_datatype_value_text = :datatypevaluetext, ");
            sqlQuery.Append(" display_order = :displayorder ");
            sqlQuery.Append(" where factory_cd = :faccd ");
            sqlQuery.Append(" and inspection_item_selection_datatype_value_id = :datatypeid ;");

            //create command
            DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sqlQuery.ToString());

            //create parameter
            DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList();

            sqlParameter.AddParameterString("faccd", UserData.GetUserData().FactoryCode);
            sqlParameter.AddParameterInteger("datatypeid", inVo.InspectionItemSelectionDatatypeValueId);
            sqlParameter.AddParameterString("datatypevaluetext", inVo.InspectionItemSelectionDatatypeValueText);
            sqlParameter.AddParameterInteger("displayorder", inVo.DisplayOrder);

            UpdateResultVo outVo = new UpdateResultVo
            {
                AffectedCount = sqlCommandAdapter.ExecuteNonQuery(sqlParameter)
            };

            return(outVo);
        }
예제 #4
0
        public override ValueObject Execute(TransactionContext trxContext, ValueObject arg)
        {
            CavityVo inVo = (CavityVo)arg;

            StringBuilder sqlQuery = new StringBuilder();

            sqlQuery.Append("Update m_cavity");
            sqlQuery.Append(" Set ");
            sqlQuery.Append(" cavity_name = :cavityname, ");
            sqlQuery.Append(" mold_id = :moldid ");
            sqlQuery.Append(" Where	");
            sqlQuery.Append(" cavity_id = :cavityid ;");

            //create command
            DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sqlQuery.ToString());

            //create parameter
            DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList();

            sqlParameter.AddParameterInteger("cavityid", inVo.CavityId);
            sqlParameter.AddParameterString("cavityname", inVo.CavityName);
            sqlParameter.AddParameterInteger("moldid", inVo.MoldId);

            CavityVo outVo = new CavityVo {
                AffectedCount = sqlCommandAdapter.ExecuteNonQuery(sqlParameter)
            };

            return(outVo);
        }
예제 #5
0
        public override ValueObject Execute(TransactionContext trxContext, ValueObject arg)
        {
            InspectionTestInstructionVo inVo = (InspectionTestInstructionVo)arg;

            StringBuilder sqlQuery = new StringBuilder();

            sqlQuery.Append("Update m_inspection_test_instruction_detail");
            sqlQuery.Append(" Set ");
            sqlQuery.Append(" inspection_test_instruction_detail_result_count = :inspectiontestinstructiondetailresultcount ");
            sqlQuery.Append(" Where	");
            sqlQuery.Append(" inspection_test_instruction_id = :inspectiontestinstructionid ");
            sqlQuery.Append(" and factory_cd = :faccd ;");


            //create command
            DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sqlQuery.ToString());

            //create parameter
            DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList();

            sqlParameter.AddParameterInteger("inspectiontestinstructiondetailresultcount", inVo.InspectionTestInstructionDetailResultCount);
            sqlParameter.AddParameterInteger("inspectiontestinstructionid", inVo.InspectionTestInstructionId);
            sqlParameter.AddParameterString("faccd", UserData.GetUserData().FactoryCode);

            InspectionTestInstructionVo outVo = new InspectionTestInstructionVo {
                AffectedCount = sqlCommandAdapter.ExecuteNonQuery(sqlParameter)
            };

            return(outVo);
        }
예제 #6
0
        public override ValueObject Execute(TransactionContext trxContext, ValueObject vo)
        {
            ProdutionWorkContentVo inVo = (ProdutionWorkContentVo)vo;
            StringBuilder          sql  = new StringBuilder();

            sql.Append("Update m_prodution_work_content set prodution_work_content_cd=:prodution_work_content_cd,prodution_work_content_name=:prodution_work_content_name,remark=:remark,display_order=:display_order,prodution_work_content_type_id = :prodution_work_content_type_id");
            sql.Append(" where prodution_work_content_id=:prodution_work_content_id");

            //create command
            DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sql.ToString());

            //create parameter
            DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList();

            sqlParameter.AddParameterString("prodution_work_content_cd", inVo.ProdutionWorkContentCode);
            sqlParameter.AddParameterString("prodution_work_content_name", inVo.ProdutionWorkContentName);
            sqlParameter.AddParameterInteger("display_order", inVo.DisplayOrder);
            sqlParameter.AddParameterInteger("prodution_work_content_type_id", inVo.ProdutionWorkContentTypeId);
            sqlParameter.AddParameterInteger("prodution_work_content_id", inVo.ProdutionWorkContentId);
            sqlParameter.AddParameterString("remark", inVo.Remark);
            sqlParameter.AddParameterString("factory_cd", inVo.FactoryCode);
            sqlParameter.AddParameterString("registration_user_cd", inVo.RegistrationUserCode);
            //execute SQL

            ProdutionWorkContentVo outVo = new ProdutionWorkContentVo
            {
                AffectedCount = sqlCommandAdapter.ExecuteNonQuery(sqlParameter)
            };

            return(outVo);
        }
예제 #7
0
        public override ValueObject Execute(TransactionContext trxContext, ValueObject arg)
        {
            FactoryProductionDaysVo inVo = (FactoryProductionDaysVo)arg;

            StringBuilder sqlQuery = new StringBuilder();

            sqlQuery.Append(" UPDATE ");
            sqlQuery.Append("  m_factory_production_days ");
            sqlQuery.Append(" SET ");
            sqlQuery.Append("  year = :iyear, ");
            sqlQuery.Append("  month = :imonth, ");
            sqlQuery.Append("  days = :idays ");
            sqlQuery.Append(" WHERE	");
            sqlQuery.Append("  factory_cd = :factorycode ");
            sqlQuery.Append(" AND ");
            sqlQuery.Append("  factory_production_days_id = :factoryproductiondaysid ");

            //create command
            DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sqlQuery.ToString());

            DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList();

            sqlParameter.AddParameterInteger("iyear", inVo.iYear);
            sqlParameter.AddParameterInteger("imonth", inVo.iMonth);
            sqlParameter.AddParameterInteger("idays", inVo.iDays);
            sqlParameter.AddParameterString("factorycode", inVo.FactoryCode);
            sqlParameter.AddParameterInteger("factoryproductiondaysid", inVo.FactoryProductionDaysId);

            FactoryProductionDaysVo outVo = new FactoryProductionDaysVo {
                AffectedCount = sqlCommandAdapter.ExecuteNonQuery(sqlParameter)
            };

            return(outVo);
        }
        public override ValueObject Execute(TransactionContext trxContext, ValueObject vo)
        {
            ResponseMachineVo inVo = (ResponseMachineVo)vo;
            StringBuilder     sql  = new StringBuilder();

            sql.Append("insert into public.m_response_machine(machine_id,prodution_work_content_id,registration_user_cd,registration_date_time,factory_cd) ");
            sql.Append("values(:machine_id,:prodution_work_content_id,:registration_user_cd,now(),:factory_cd)");

            //create command
            DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sql.ToString());
            //
            DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList();

            sqlParameter.AddParameterInteger("machine_id", inVo.MachineId);
            sqlParameter.AddParameterInteger("prodution_work_content_id", inVo.ProdutionWorkContentId);

            sqlParameter.AddParameterString("factory_cd", inVo.FactoryCode);
            sqlParameter.AddParameterString("registration_user_cd", inVo.RegistrationUserCode);
            //execute SQL

            ResponseMachineVo outVo = new ResponseMachineVo
            {
                AffectedCount = sqlCommandAdapter.ExecuteNonQuery(sqlParameter)
            };

            return(outVo);
        }
예제 #9
0
        public override ValueObject Execute(TransactionContext trxContext, ValueObject vo)
        {
            PlanWorkingStatusVo inVo = (PlanWorkingStatusVo)vo;
            StringBuilder       sql  = new StringBuilder();

            sql.Append("insert into t_plan_status_machine(plan_section, plan_datetime_add, total_no, plan_data_no, plan_data_div, registration_user_cd, registration_date_time, factory_cd) ");
            sql.Append("values(:plan_section, :plan_datetime_add, :total_no, :plan_data_no, :plan_data_div,  :registration_user_cd,now(), :factory_cd)");

            //create command
            DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sql.ToString());

            //create parameter
            DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList();

            sqlParameter.AddParameterString("plan_section", inVo.PlanSection);
            sqlParameter.AddParameterDateTime("plan_datetime_add", inVo.DateTimeAdd);
            sqlParameter.AddParameterInteger("total_no", inVo.TotalNo);
            sqlParameter.AddParameterInteger("plan_data_no", inVo.PlanNo);
            sqlParameter.AddParameter("plan_data_div", inVo.Rate);
            sqlParameter.AddParameterDateTime("registration_date_time", inVo.RegistrationDateTime);
            sqlParameter.AddParameterString("factory_cd", inVo.FactoryCode);
            sqlParameter.AddParameterString("registration_user_cd", inVo.RegistrationUserCode);

            //execute SQL

            PlanWorkingStatusVo outVo = new PlanWorkingStatusVo
            {
                AffectedCount = sqlCommandAdapter.ExecuteNonQuery(sqlParameter)
            };

            return(outVo);
        }
예제 #10
0
        public override ValueObject Execute(TransactionContext trxContext, ValueObject vo)
        {
            CauseVo       inVo = (CauseVo)vo;
            StringBuilder sql  = new StringBuilder();

            sql.Append("insert into public.m_ncvp_cause(machine_id,defective_reason_id,registration_user_cd,registration_date_time,factory_cd) ");
            sql.Append("values(:machine_id,:defective_reason_id,:registration_user_cd,now(),:factory_cd)");

            //create command
            DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sql.ToString());
            //
            DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList();

            sqlParameter.AddParameterInteger("machine_id", inVo.MachineID);
            sqlParameter.AddParameterInteger("defective_reason_id", inVo.DefectiveID);

            sqlParameter.AddParameterString("factory_cd", inVo.FactoryCode);
            sqlParameter.AddParameterString("registration_user_cd", inVo.RegistrationUserCode);
            //execute SQL

            CauseVo outVo = new CauseVo
            {
                AffectedCount = sqlCommandAdapter.ExecuteNonQuery(sqlParameter)
            };

            return(outVo);
        }
예제 #11
0
        public override ValueObject Execute(TransactionContext trxContext, ValueObject arg)
        {
            MoldItemVo inVo = (MoldItemVo)arg;

            StringBuilder sqlQuery = new StringBuilder();

            sqlQuery.Append(" Delete From m_mold_item");
            sqlQuery.Append(" Where mold_id = :moldid ");

            if (inVo.GlobalItemId > 0)
            {
                sqlQuery.Append(" and global_item_id = :globalitemid ");
            }

            //create command
            DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sqlQuery.ToString());

            //create parameter
            DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList();

            sqlParameter.AddParameterInteger("moldid", inVo.MoldId);

            if (inVo.GlobalItemId > 0)
            {
                sqlParameter.AddParameterInteger("globalitemid", inVo.GlobalItemId);
            }

            MoldItemVo outVo = new MoldItemVo {
                AffectedCount = sqlCommandAdapter.ExecuteNonQuery(sqlParameter)
            };

            return(outVo);
        }
        public override ValueObject Execute(TransactionContext trxContext, ValueObject arg)
        {
            DefectiveReasonVo inVo = (DefectiveReasonVo)arg;

            StringBuilder sqlQuery = new StringBuilder();

            sqlQuery.Append("Update m_defective_reason");
            sqlQuery.Append(" Set ");
            sqlQuery.Append(" defective_reason_name = :defectivereasonname, ");
            sqlQuery.Append(" defective_category_id = :defectivecategoryid, ");
            sqlQuery.Append(" display_order = :displayorder");
            sqlQuery.Append(" Where	");
            sqlQuery.Append(" defective_reason_id = :defectivereasonid ");
            sqlQuery.Append(" and factory_cd = :faccd ;");
            //create command
            DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sqlQuery.ToString());

            //create parameter
            DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList();

            sqlParameter.AddParameterInteger("defectivereasonid", inVo.DefectiveReasonId);
            sqlParameter.AddParameterString("defectivereasonname", inVo.DefectiveReasonName);
            sqlParameter.AddParameterInteger("defectivecategoryid", inVo.DefectiveCategoryId);
            sqlParameter.AddParameterInteger("displayorder", inVo.DisplayOrder);
            sqlParameter.AddParameterString("faccd", UserData.GetUserData().FactoryCode);

            DefectiveReasonVo outVo = new DefectiveReasonVo
            {
                AffectedCount = sqlCommandAdapter.ExecuteNonQuery(sqlParameter)
            };

            return(outVo);
        }
        public override ValueObject Execute(TransactionContext trxContext, ValueObject vo)
        {
            MachineAndEquipmentVo inVo = (MachineAndEquipmentVo)vo;
            StringBuilder         sql  = new StringBuilder();

            sql.Append("insert into public.m_machine_equipment(machine_id,equipment_id) ");
            sql.Append("values(:machine_id,:equipment_id)");

            //create command
            DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sql.ToString());
            //
            DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList();

            sqlParameter.AddParameterInteger("machine_id", inVo.MachineID);
            sqlParameter.AddParameterInteger("equipment_id", inVo.EquipmentID);

            //execute SQL

            MachineAndEquipmentVo outVo = new MachineAndEquipmentVo
            {
                AffectedCount = sqlCommandAdapter.ExecuteNonQuery(sqlParameter)
            };

            return(outVo);
        }
        public override ValueObject Execute(TransactionContext trxContext, ValueObject arg)
        {
            InspectionSpecificationVo inVo = (InspectionSpecificationVo)arg;

            StringBuilder sqlQuery = new StringBuilder();

            sqlQuery.Append("Delete From m_inspection_specification");
            sqlQuery.Append(" Where	");
            if (inVo.InspectionItemId > 0)
            {
                sqlQuery.Append(" inspection_item_id = :inspectionitemid ");
            }
            else
            {
                sqlQuery.Append(" inspection_specification_id = :inspectionspecificationid ");
            }

            sqlQuery.Append(" and factory_cd = :faccd ;");

            //create command
            DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sqlQuery.ToString());

            //create parameter
            DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList();

            sqlParameter.AddParameterInteger("inspectionspecificationid", inVo.InspectionSpecificationId);
            sqlParameter.AddParameterInteger("inspectionitemid", inVo.InspectionItemId);
            sqlParameter.AddParameterString("faccd", UserData.GetUserData().FactoryCode);

            InspectionSpecificationVo outVo = new InspectionSpecificationVo {
                AffectedCount = sqlCommandAdapter.ExecuteNonQuery(sqlParameter)
            };

            return(outVo);
        }
예제 #15
0
        public override ValueObject Execute(TransactionContext trxContext, ValueObject arg)
        {
            CastingMachineFurnaceVo inVo = (CastingMachineFurnaceVo)arg;

            CastingMachineFurnaceVo outVo = new CastingMachineFurnaceVo();

            StringBuilder sqlQuery = new StringBuilder();

            sqlQuery.Append("Update m_casting_machine_furnace");
            sqlQuery.Append(" set ");
            sqlQuery.Append(" casting_machine_furnace_name = ");
            sqlQuery.Append(" :castfurname, ");
            sqlQuery.Append(" equipment_id = ");
            sqlQuery.Append(" :eqpid,");
            sqlQuery.Append(" factory_cd = ");
            sqlQuery.Append(" :factcode");
            sqlQuery.Append(" where");
            sqlQuery.Append(" casting_machine_furnace_id = ");
            sqlQuery.Append(" :castfurid");

            //create command
            DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sqlQuery.ToString());

            //create parameter
            DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList();

            sqlParameter.AddParameterInteger("castfurid", inVo.CastingMachineFurnaceId);
            sqlParameter.AddParameterString("castfurname", inVo.CastingMachineFurnaceName);
            sqlParameter.AddParameterInteger("eqpid", inVo.EquipmentId);
            sqlParameter.AddParameterString("factcode", inVo.FactoryCode);

            outVo.AffectedCount = sqlCommandAdapter.ExecuteNonQuery(sqlParameter);

            return(outVo);
        }
예제 #16
0
        public override ValueObject Execute(TransactionContext trxContext, ValueObject vo)
        {
            InvertoryVo   inVo = (InvertoryVo)vo;
            StringBuilder sql  = new StringBuilder();

            sql.Append("insert into t_invertory_equipments(warehouse_main_id, location_id, invertory_time_id,invertory_value, registration_user_cd, registration_date_time, factory_cd) ");
            sql.Append("values(:warehouse_main_id,:location_id,:invertory_time_id,:invertory_value, :registration_user_cd,now(),:factory_cd)");

            //create command
            DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sql.ToString());

            //create parameter
            DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList();

            sqlParameter.AddParameterInteger("warehouse_main_id", inVo.WarehouseMainId);
            sqlParameter.AddParameterInteger("invertory_time_id", inVo.InvertoryTimeId);
            sqlParameter.AddParameter("invertory_value", bool.Parse(inVo.InvertoryValue.ToString()));
            sqlParameter.AddParameterString("factory_cd", inVo.FactoryCode);
            sqlParameter.AddParameterString("registration_user_cd", inVo.RegistrationUserCode);
            sqlParameter.AddParameterInteger("location_id", inVo.LocationID);
            //execute SQL

            InvertoryVo outVo = new InvertoryVo
            {
                AffectedCount = sqlCommandAdapter.ExecuteNonQuery(sqlParameter)
            };

            return(outVo);
        }
        public override ValueObject Execute(TransactionContext trxContext, ValueObject arg)
        {
            LineDefectiveReasonVo inVo = (LineDefectiveReasonVo)arg;

            StringBuilder sqlQuery = new StringBuilder();

            sqlQuery.Append("Delete From m_line_defective_reason");
            sqlQuery.Append(" Where	");
            sqlQuery.Append(" defective_reason_id = :defrsnid ");
            sqlQuery.Append(" and factory_cd = :faccd ");
            if (inVo.LineId > 0)
            {
                sqlQuery.Append(" and line_id = :lid");
            }

            //create command
            DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sqlQuery.ToString());

            //create parameter
            DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList();

            sqlParameter.AddParameterInteger("defrsnid", inVo.DefectiveReasonId);
            sqlParameter.AddParameterString("faccd", UserData.GetUserData().FactoryCode);
            sqlParameter.AddParameterInteger("lid", inVo.LineId);


            UpdateResultVo outVo = new UpdateResultVo
            {
                AffectedCount = sqlCommandAdapter.ExecuteNonQuery(sqlParameter)
            };

            return(outVo);
        }
예제 #18
0
        public override ValueObject Execute(TransactionContext trxContext, ValueObject arg)
        {
            MoldTypeVo inVo = (MoldTypeVo)arg;

            StringBuilder sqlQuery = new StringBuilder();

            sqlQuery.Append("Update m_mold_type");
            sqlQuery.Append(" Set ");
            sqlQuery.Append(" mold_type_name = :moldtypename, ");
            sqlQuery.Append(" item_id = :itemid ");
            sqlQuery.Append(" Where	");
            sqlQuery.Append(" mold_type_id = :moldtypeid ");
            sqlQuery.Append(" and factory_cd = :faccd ;");

            //create command
            DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sqlQuery.ToString());

            //create parameter
            DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList();

            sqlParameter.AddParameterString("faccd", UserData.GetUserData().FactoryCode);
            sqlParameter.AddParameterInteger("moldtypeid", inVo.MoldTypeId);
            sqlParameter.AddParameterString("moldtypename", inVo.MoldTypeName);
            sqlParameter.AddParameterInteger("itemid", inVo.ItemId);

            MoldTypeVo outVo = new MoldTypeVo {
                AffectedCount = sqlCommandAdapter.ExecuteNonQuery(sqlParameter)
            };

            return(outVo);
        }
        public override ValueObject Execute(TransactionContext trxContext, ValueObject vo)
        {
            FunctionDeptVo inVo = (FunctionDeptVo)vo;
            StringBuilder  sql  = new StringBuilder();

            sql.Append("update vcb_functiondept set vcb_functiondept_cd =:vcb_functiondept_cd, vcb_functiondept_name =:vcb_functiondept_name, user_name =:user_name, vcb_department_id =:vcb_department_id");
            sql.Append(" where vcb_functiondept_id =:vcb_functiondept_id");

            //create command
            DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sql.ToString());

            //create parameter
            DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList();

            sqlParameter.AddParameterString("vcb_functiondept_cd", inVo.FunctionDeptCode);
            sqlParameter.AddParameterString("vcb_functiondept_name", inVo.FunctionDeptName);
            sqlParameter.AddParameterString("user_name", inVo.UserName);
            sqlParameter.AddParameterInteger("vcb_department_id", inVo.DepartmentId);
            sqlParameter.AddParameterInteger("vcb_functiondept_id", inVo.FunctionDeptId);


            //execute SQL

            FunctionDeptVo outVo = new FunctionDeptVo
            {
                AffectedCount = sqlCommandAdapter.ExecuteNonQuery(sqlParameter)
            };

            return(outVo);
        }
예제 #20
0
        public override ValueObject Execute(TransactionContext trxContext, ValueObject vo)
        {
            InvertoryVo   inVo = (InvertoryVo)vo;
            StringBuilder sql  = new StringBuilder();

            sql.Append("update  t_account_main set invertory_time_id =:invertory_time_id where account_main_id =:account_main_id");

            //create command
            DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sql.ToString());

            //create parameter
            DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList();

            sqlParameter.AddParameterInteger("account_main_id", inVo.AccountMainId);
            sqlParameter.AddParameterInteger("invertory_time_id", inVo.InvertoryTimeId);


            //execute SQL

            InvertoryVo outVo = new InvertoryVo
            {
                AffectedCount = sqlCommandAdapter.ExecuteNonQuery(sqlParameter)
            };

            return(outVo);
        }
예제 #21
0
        public override ValueObject Execute(TransactionContext trxContext, ValueObject vo)
        {
            InvertoryVo   inVo     = (InvertoryVo)vo;
            StringBuilder sql      = new StringBuilder();
            InvertoryVo   voNOList = new InvertoryVo();
            //create command
            DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sql.ToString());

            //create parameter
            DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList();

            sql.Append(@"select count(*) as RowCount from t_invertory_equipments where ");
            sql.Append(" warehouse_main_id  =:warehouse_main_id");
            sqlParameter.AddParameterInteger("warehouse_main_id", inVo.WarehouseMainId);
            sql.Append(" and  invertory_time_id  =:invertory_time_id");
            sqlParameter.AddParameterInteger("invertory_time_id", inVo.InvertoryTimeId);

            sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sql.ToString());

            //execute SQL
            IDataReader dataReader = sqlCommandAdapter.ExecuteReader(trxContext, sqlParameter);

            while (dataReader.Read())
            {
                InvertoryVo outVo = new InvertoryVo
                {
                    AffectedCount = Convert.ToInt32(dataReader["RowCount"].ToString()),
                };
                voNOList.AffectedCount = outVo.AffectedCount;
            }
            dataReader.Close();
            return(voNOList);
        }
예제 #22
0
        public override ValueObject Execute(TransactionContext trxContext, ValueObject arg)
        {
            ProcessWorksVo inVo = (ProcessWorksVo)arg;

            StringBuilder sqlQuery = new StringBuilder();

            sqlQuery.Append("Update m_process_work");
            sqlQuery.Append(" Set ");
            sqlQuery.Append(" process_work_name = :processworkname, ");
            sqlQuery.Append(" process_id = :processid, ");
            sqlQuery.Append(" model_id  = :modelid, ");
            sqlQuery.Append(" machine_id  = :machineid ");
            sqlQuery.Append(" Where	");
            sqlQuery.Append(" process_work_id = :processworkid ;");

            //create command
            DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sqlQuery.ToString());

            //create parameter
            DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList();

            sqlParameter.AddParameterInteger("processworkid", inVo.ProcessWorkId);
            sqlParameter.AddParameterString("processworkname", inVo.ProcessWorkName);
            sqlParameter.AddParameterInteger("processid", inVo.AssyID);
            sqlParameter.AddParameterInteger("modelid", inVo.ModelID);
            sqlParameter.AddParameterInteger("machineid", inVo.MachineID);

            ProcessWorksVo outVo = new ProcessWorksVo {
                AffectedCount = sqlCommandAdapter.ExecuteNonQuery(sqlParameter)
            };

            return(outVo);
        }
예제 #23
0
        public override ValueObject Execute(TransactionContext trxContext, ValueObject vo)
        {
            DetailPositionVo inVo = (DetailPositionVo)vo;
            StringBuilder    sql  = new StringBuilder();

            sql.Append("update m_detail_postion set detail_postion_cd=:detail_postion_cd,detail_postion_name=:detail_postion_name, location_id=:location_id");
            sql.Append(" where detail_postion_id =:detail_postion_id");

            //create command
            DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sql.ToString());

            //create parameter
            DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList();

            sqlParameter.AddParameterString("detail_postion_cd", inVo.DetailPositionCode);
            sqlParameter.AddParameterString("detail_postion_name", inVo.DetailPositionName);
            sqlParameter.AddParameterInteger("detail_postion_id", inVo.DetailPositionId);
            sqlParameter.AddParameterInteger("location_id", inVo.LocationId);
            sqlParameter.AddParameterString("factory_cd", inVo.FactoryCode);
            sqlParameter.AddParameterString("registration_user_cd", inVo.RegistrationUserCode);
            //execute SQL

            DetailPositionVo outVo = new DetailPositionVo
            {
                AffectedCount = sqlCommandAdapter.ExecuteNonQuery(sqlParameter)
            };

            return(outVo);
        }
        public override ValueObject Execute(TransactionContext trxContext, ValueObject arg)
        {
            ProcessWorkVo inVo = (ProcessWorkVo)arg;

            StringBuilder sqlQuery = new StringBuilder();

            sqlQuery.Append("Update m_process_work");
            sqlQuery.Append(" Set ");
            sqlQuery.Append(" process_work_name = :processworkname, ");
            sqlQuery.Append(" process_id = :processid, ");
            sqlQuery.Append(" is_phantom = :isphantom, ");
            sqlQuery.Append(" line_machine_selection  = :linemachineselection, ");
            sqlQuery.Append(" display_order  = :displayorder ");
            sqlQuery.Append(" Where	");
            sqlQuery.Append(" process_work_id = :processworkid ;");

            //create command
            DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sqlQuery.ToString());

            //create parameter
            DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList();

            sqlParameter.AddParameterInteger("processworkid", inVo.ProcessWorkId);
            sqlParameter.AddParameterString("processworkname", inVo.ProcessWorkName);
            sqlParameter.AddParameterInteger("processid", inVo.ProcessId);
            sqlParameter.AddParameterString("isphantom", inVo.IsPhantom);
            sqlParameter.AddParameterInteger("linemachineselection", inVo.LineMachineSelection);
            sqlParameter.AddParameterInteger("displayorder", inVo.DisplayOrder);

            ProcessWorkVo outVo = new ProcessWorkVo {
                AffectedCount = sqlCommandAdapter.ExecuteNonQuery(sqlParameter)
            };

            return(outVo);
        }
        public override ValueObject Execute(TransactionContext trxContext, ValueObject arg)
        {
            ShelfVo inVo = (ShelfVo)arg;

            StringBuilder sqlQuery = new StringBuilder();

            sqlQuery.Append("Update m_shelf");
            sqlQuery.Append(" Set ");
            sqlQuery.Append(" shelf_name = :shelfname, ");
            sqlQuery.Append(" area_id = :areaid ");
            sqlQuery.Append(" Where	");
            sqlQuery.Append(" shelf_id = :shelfid ;");

            //create command
            DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sqlQuery.ToString());

            //create parameter
            DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList();

            sqlParameter.AddParameterInteger("shelfid", inVo.ShelfId);
            sqlParameter.AddParameterString("shelfname", inVo.ShelfName);
            sqlParameter.AddParameterInteger("areaid", inVo.AreaId);

            ShelfVo outVo = new ShelfVo {
                AffectedCount = sqlCommandAdapter.ExecuteNonQuery(sqlParameter)
            };

            return(outVo);
        }
예제 #26
0
        public override ValueObject Execute(TransactionContext trxContext, ValueObject vo)
        {
            TransferVo    inVo = (TransferVo)vo;
            StringBuilder sql  = new StringBuilder();

            sql.Append("insert into t_transfer_detail_info(transfer_device_id, asset_id, registration_user_cd, registration_date_time, factory_cd) ");
            sql.Append("values(:transfer_device_id,:asset_id, :registration_user_cd,now(),:factory_cd)");

            //create command
            DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sql.ToString());

            //create parameter
            DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList();

            sqlParameter.AddParameterInteger("transfer_device_id", inVo.TransferDeviceId);
            sqlParameter.AddParameterInteger("asset_id", inVo.AssetID);

            sqlParameter.AddParameterString("factory_cd", inVo.FactoryCode);
            sqlParameter.AddParameterString("registration_user_cd", inVo.RegistrationUserCode);
            //execute SQL

            TransferVo outVo = new TransferVo
            {
                AffectedCount = sqlCommandAdapter.ExecuteNonQuery(sqlParameter)
            };

            return(outVo);
        }
예제 #27
0
        public override ValueObject Execute(TransactionContext trxContext, ValueObject arg)
        {
            ItemProcessWorkVo inVo = (ItemProcessWorkVo)arg;

            StringBuilder sqlQuery = new StringBuilder();

            sqlQuery.Append("Update m_item_process_work");
            sqlQuery.Append(" Set ");
            sqlQuery.Append(" item_id = :itemid, ");
            sqlQuery.Append(" is_optional_process = :optionalflg, ");
            sqlQuery.Append(" skip_prevention_flg = :skippreventionflg, ");
            sqlQuery.Append(" work_order = :workorder, ");
            sqlQuery.Append(" process_flow_rule_id = :processflowruleid ");
            sqlQuery.Append(" Where	");
            sqlQuery.Append(" item_process_work_id = :itemprocessworkid");

            //create command
            DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sqlQuery.ToString());

            //create parameter
            DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList();

            sqlParameter.AddParameterInteger("itemid", inVo.ItemId);
            sqlParameter.AddParameterString("optionalflg", inVo.OptionalProcessFlag);
            sqlParameter.AddParameterInteger("skippreventionflg", inVo.SkipPreventionFlag);
            sqlParameter.AddParameterInteger("workorder", inVo.WorkOrder);
            sqlParameter.AddParameterInteger("processflowruleid", inVo.ProcessFlowRuleId);
            sqlParameter.AddParameterInteger("itemprocessworkid", inVo.ItemProcessWorkId);

            ItemProcessWorkVo outVo = new ItemProcessWorkVo {
                AffectedCount = sqlCommandAdapter.ExecuteNonQuery(sqlParameter)
            };

            return(outVo);
        }
예제 #28
0
        public override ValueObject Execute(TransactionContext trxContext, ValueObject vo)
        {
            ProdutionWorkContentVo inVo = (ProdutionWorkContentVo)vo;
            StringBuilder          sql  = new StringBuilder();

            sql.Append("insert into m_work_content(work_content_cd,work_content_name,display_order,remark,work_content_type_id,registration_user_cd,registration_date_time,factory_cd) ");
            sql.Append("values(:prodution_work_content_cd,:prodution_work_content_name,:display_order,:remark,:prodution_work_content_type_id,:registration_user_cd,:registrationDatetime,:factory_cd)");

            //create command
            DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sql.ToString());

            //create parameter
            DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList();

            sqlParameter.AddParameterString("prodution_work_content_cd", inVo.ProdutionWorkContentCode);
            sqlParameter.AddParameterString("prodution_work_content_name", inVo.ProdutionWorkContentName);
            sqlParameter.AddParameterInteger("display_order", inVo.DisplayOrder);
            sqlParameter.AddParameterInteger("prodution_work_content_type_id", inVo.ProdutionWorkContentTypeId);
            sqlParameter.AddParameterString("remark", inVo.Remark);

            sqlParameter.AddParameterString("factory_cd", UserData.GetUserData().FactoryCode);
            sqlParameter.AddParameterString("registration_user_cd", UserData.GetUserData().UserCode);
            sqlParameter.AddParameterDateTime("registrationDatetime", trxContext.ProcessingDBDateTime);
            //execute SQL

            ProdutionWorkContentVo outVo = new ProdutionWorkContentVo
            {
                AffectedCount = sqlCommandAdapter.ExecuteNonQuery(sqlParameter)
            };

            return(outVo);
        }
예제 #29
0
        public override ValueObject Execute(TransactionContext trxContext, ValueObject vo)
        {
            ModelProcessVo inVo = (ModelProcessVo)vo;
            StringBuilder  sql  = new StringBuilder();

            sql.Append("insert into public.m_ncvp_model_process(model_id,process_id,registration_user_cd,registration_date_time,factory_cd) ");
            sql.Append("values(:model_id,:process_id,:registration_user_cd,now(),:factory_cd)");

            //create command
            DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sql.ToString());
            //
            DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList();

            sqlParameter.AddParameterInteger("model_id", inVo.ModelID);
            sqlParameter.AddParameterInteger("process_id", inVo.ProcessID);

            sqlParameter.AddParameterString("factory_cd", inVo.FactoryCode);
            sqlParameter.AddParameterString("registration_user_cd", inVo.RegistrationUserCode);
            //execute SQL

            ModelProcessVo outVo = new ModelProcessVo
            {
                AffectedCount = sqlCommandAdapter.ExecuteNonQuery(sqlParameter)
            };

            return(outVo);
        }
        public override ValueObject Execute(TransactionContext trxContext, ValueObject arg)
        {
            ItemLineInspectionFormatVo inVo = (ItemLineInspectionFormatVo)arg;

            StringBuilder sqlQuery = new StringBuilder();

            sqlQuery.Append("Update m_item_line_inspection_format");
            sqlQuery.Append(" Set ");
            sqlQuery.Append(" sap_matnr_item_cd = :itemcd, ");
            sqlQuery.Append(" line_id = :lineid, ");
            sqlQuery.Append(" inspection_format_id = :inspectionformatid ");
            sqlQuery.Append(" Where	");
            sqlQuery.Append(" item_line_inspection_format_id = :itemlineinspectionformatid ");
            sqlQuery.Append(" and factory_cd = :faccd ;");

            //create command
            DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sqlQuery.ToString());

            //create parameter
            DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList();

            sqlParameter.AddParameterInteger("itemlineinspectionformatid", inVo.ItemLineInspectionFormatId);
            sqlParameter.AddParameterString("itemcd", inVo.SapItemCode);
            sqlParameter.AddParameterInteger("lineid", inVo.LineId);
            sqlParameter.AddParameterInteger("inspectionformatid", inVo.InspectionFormatId);
            sqlParameter.AddParameterString("faccd", UserData.GetUserData().FactoryCode);

            ItemLineInspectionFormatVo outVo = new ItemLineInspectionFormatVo {
                AffectedCount = sqlCommandAdapter.ExecuteNonQuery(sqlParameter)
            };

            return(outVo);
        }