コード例 #1
0
        /// <summary>
        /// 根据浇次主键删除对应的工序计划
        /// </summary>
        /// <param name="C_FK">浇次主键</param>
        /// <returns></returns>
        public bool DeleteByJcID(string C_FK)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("delete from TPA_ROLL_PLAN ");
            strSql.Append(" where C_FK=:C_FK ");
            OracleParameter[] parameters =
            {
                new OracleParameter(":C_FK", OracleDbType.Varchar2, 50)
            };
            parameters[0].Value = C_FK;

            int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #2
0
ファイル: Dal_TS_MODULE.cs プロジェクト: rcw0125/PCI20200819
        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete_PID(string C_PARENTMODULEID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("delete from TS_MODULE ");
            strSql.Append(" where C_PARENTMODULEID=:C_PARENTMODULEID and C_MODULE_TYPE='3' ");
            OracleParameter[] parameters =
            {
                new OracleParameter(":C_PARENTMODULEID", OracleDbType.Varchar2, 100)
            };
            parameters[0].Value = C_PARENTMODULEID;

            int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #3
0
        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(string C_ID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("delete from TQC_SPECIFIC_CONTENT ");
            strSql.Append(" where C_ID=:C_ID ");
            OracleParameter[] parameters =
            {
                new OracleParameter(":C_ID", OracleDbType.Varchar2, 100)
            };
            parameters[0].Value = C_ID;

            int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #4
0
        /// <summary>
        /// 修改该方案下工位的数据
        /// </summary>
        /// <param name="C_INITIALIZE_ITEM_ID">方案id</param>
        /// <param name="C_STA_ID">工位id</param>
        /// <returns></returns>
        public bool UpdateBySTAFID(string C_INITIALIZE_ITEM_ID, string C_STA_ID, decimal?N_WGT)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update TPP_INITIALIZE_STA set N_WGT=N_WGT+:N_WGT ");
            strSql.Append(" where C_INITIALIZE_ITEM_ID=:C_INITIALIZE_ITEM_ID AND C_STA_ID=:C_STA_ID");
            OracleParameter[] parameters = { new OracleParameter(":N_WGT",                OracleDbType.Decimal,   15),
                                             new OracleParameter(":C_INITIALIZE_ITEM_ID", OracleDbType.Varchar2, 100),
                                             new OracleParameter(":C_STA_ID",             OracleDbType.Varchar2, 100) };
            parameters[0].Value = N_WGT;
            parameters[1].Value = C_INITIALIZE_ITEM_ID;
            parameters[2].Value = C_STA_ID;
            int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #5
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Mod_TQR_REJECTS model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into TQR_REJECTS(");
            strSql.Append("C_STOVE,C_BATCH_NO,C_STL_GRD,C_STL_GRD_TYPE,C_REASON_NAME,C_REASON_QUA,N_REASON_WGT)");
            strSql.Append(" values (");
            strSql.Append(":C_STOVE,:C_BATCH_NO,:C_STL_GRD,:C_STL_GRD_TYPE,:C_REASON_NAME,:C_REASON_QUA,:N_REASON_WGT)");
            OracleParameter[] parameters =
            {
                new OracleParameter(":C_STOVE",        OracleDbType.Varchar2, 100),
                new OracleParameter(":C_BATCH_NO",     OracleDbType.Varchar2, 100),
                new OracleParameter(":C_STL_GRD",      OracleDbType.Varchar2, 100),
                new OracleParameter(":C_STL_GRD_TYPE", OracleDbType.Varchar2, 100),
                new OracleParameter(":C_REASON_NAME",  OracleDbType.Varchar2, 100),
                new OracleParameter(":C_REASON_QUA",   OracleDbType.Varchar2, 100),
                new OracleParameter(":N_REASON_WGT",   OracleDbType.Double, 15)
            };
            parameters[0].Value = model.C_STOVE;
            parameters[1].Value = model.C_BATCH_NO;
            parameters[2].Value = model.C_STL_GRD;
            parameters[3].Value = model.C_STL_GRD_TYPE;
            parameters[4].Value = model.C_REASON_NAME;
            parameters[5].Value = model.C_REASON_QUA;
            parameters[6].Value = model.N_REASON_WGT;

            int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #6
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Mod_TQB_COPING_BASIC model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into TQB_COPING_BASIC(");
            strSql.Append("C_COPING_CRAFT,C_CRAFT_FLOW,N_STATUS,C_REMARK,C_EMP_ID,D_MOD_DT,C_IS_BXG)");
            strSql.Append(" values (");
            strSql.Append(":C_COPING_CRAFT,:C_CRAFT_FLOW,:N_STATUS,:C_REMARK,:C_EMP_ID,:D_MOD_DT,:C_IS_BXG)");
            OracleParameter[] parameters =
            {
                new OracleParameter(":C_COPING_CRAFT", OracleDbType.Varchar2, 100),
                new OracleParameter(":C_CRAFT_FLOW",   OracleDbType.Varchar2, 500),
                new OracleParameter(":N_STATUS",       OracleDbType.Decimal,    1),
                new OracleParameter(":C_REMARK",       OracleDbType.Varchar2, 500),
                new OracleParameter(":C_EMP_ID",       OracleDbType.Varchar2, 100),
                new OracleParameter(":D_MOD_DT",       OracleDbType.Date),
                new OracleParameter(":C_IS_BXG",       OracleDbType.Varchar2, 100)
            };
            parameters[0].Value = model.C_COPING_CRAFT;
            parameters[1].Value = model.C_CRAFT_FLOW;
            parameters[2].Value = model.N_STATUS;
            parameters[3].Value = model.C_REMARK;
            parameters[4].Value = model.C_EMP_ID;
            parameters[5].Value = model.D_MOD_DT;
            parameters[6].Value = model.C_IS_BXG;

            int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #7
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Mod_TQB_PHYSICS_GROUP_STD model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into TQB_PHYSICS_GROUP_STD(");
            strSql.Append("C_PHYSICS_CODE,C_PHYSICS_NAME,C_STL_GRD,C_STD_CODE,N_STATUS,C_REMARK,C_EMP_ID)");
            strSql.Append(" values (");
            strSql.Append(":C_PHYSICS_CODE,:C_PHYSICS_NAME,:C_STL_GRD,:C_STD_CODE,:N_STATUS,:C_REMARK,:C_EMP_ID)");
            OracleParameter[] parameters =
            {
                new OracleParameter(":C_PHYSICS_CODE", OracleDbType.Varchar2, 100),
                new OracleParameter(":C_PHYSICS_NAME", OracleDbType.Varchar2, 100),
                new OracleParameter(":C_STL_GRD",      OracleDbType.Varchar2, 100),
                new OracleParameter(":C_STD_CODE",     OracleDbType.Varchar2, 100),
                new OracleParameter(":N_STATUS",       OracleDbType.Int32,      1),
                new OracleParameter(":C_REMARK",       OracleDbType.Varchar2, 500),
                new OracleParameter(":C_EMP_ID",       OracleDbType.Varchar2, 100)
            };
            parameters[0].Value = model.C_PHYSICS_CODE;
            parameters[1].Value = model.C_PHYSICS_NAME;
            parameters[2].Value = model.C_STL_GRD;
            parameters[3].Value = model.C_STD_CODE;
            parameters[4].Value = model.N_STATUS;
            parameters[5].Value = model.C_REMARK;
            parameters[6].Value = model.C_EMP_ID;

            int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #8
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Mod_TPP_PROD_INITIALIZE model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into TPP_PROD_INITIALIZE(");
            strSql.Append("C_ISSUE,D_START_TIME,D_END_TIME,C_TYPE,C_YM,C_REMARK,C_EMP_ID)");
            strSql.Append(" values (");
            strSql.Append(":C_ISSUE,:D_START_TIME,:D_END_TIME,:C_TYPE,:C_YM,:C_REMARK,:C_EMP_ID)");
            OracleParameter[] parameters =
            {
                new OracleParameter(":C_ISSUE",      OracleDbType.Varchar2, 100),
                new OracleParameter(":D_START_TIME", OracleDbType.Date),
                new OracleParameter(":D_END_TIME",   OracleDbType.Date),
                new OracleParameter(":C_TYPE",       OracleDbType.Varchar2, 100),
                new OracleParameter(":C_YM",         OracleDbType.Varchar2, 100),
                new OracleParameter(":C_REMARK",     OracleDbType.Varchar2, 200),
                new OracleParameter(":C_EMP_ID",     OracleDbType.Varchar2, 100)
            };
            parameters[0].Value = model.C_ISSUE;
            parameters[1].Value = model.D_START_TIME;
            parameters[2].Value = model.D_END_TIME;
            parameters[3].Value = model.C_TYPE;
            parameters[4].Value = model.C_YM;
            parameters[5].Value = model.C_REMARK;
            parameters[6].Value = model.C_EMP_ID;

            int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #9
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Mod_TQB_SAMPLING_GROUP model)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("update TQB_SAMPLING_GROUP set ");
            strSql.Append("C_PHYSICS_GROUP_ID=:C_PHYSICS_GROUP_ID,");
            strSql.Append("C_SAMPLING_ID=:C_SAMPLING_ID,");
            strSql.Append("N_STATUS=:N_STATUS,");
            strSql.Append("C_REMARK=:C_REMARK,");
            strSql.Append("C_EMP_ID=:C_EMP_ID,");
            strSql.Append("D_MOD_DT=:D_MOD_DT");
            strSql.Append(" where C_ID=:C_ID ");
            OracleParameter[] parameters = {
                    new OracleParameter(":C_PHYSICS_GROUP_ID", OracleDbType.Varchar2,100),
                    new OracleParameter(":C_SAMPLING_ID", OracleDbType.Varchar2,100),
                    new OracleParameter(":N_STATUS", OracleDbType.Decimal,1),
                    new OracleParameter(":C_REMARK", OracleDbType.Varchar2,500),
                    new OracleParameter(":C_EMP_ID", OracleDbType.Varchar2,100),
                    new OracleParameter(":D_MOD_DT", OracleDbType.Date),
                    new OracleParameter(":C_ID", OracleDbType.Varchar2,100)};
            parameters[0].Value = model.C_PHYSICS_GROUP_ID;
            parameters[1].Value = model.C_SAMPLING_ID;
            parameters[2].Value = model.N_STATUS;
            parameters[3].Value = model.C_REMARK;
            parameters[4].Value = model.C_EMP_ID;
            parameters[5].Value = model.D_MOD_DT;
            parameters[6].Value = model.C_ID;

            int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
コード例 #10
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Mod_TPB_STA_HISTORY_CAP model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into TPB_STA_HISTORY_CAP(");
            strSql.Append("C_STA_ID,C_PRO_ID,N_CAPACITY,N_STATUS,C_EMP_ID,D_MOD_DT,C_REMARK)");
            strSql.Append(" values (");
            strSql.Append(":C_STA_ID,:C_PRO_ID,:N_CAPACITY,:N_STATUS,:C_EMP_ID,:D_MOD_DT,:C_REMARK)");
            OracleParameter[] parameters =
            {
                new OracleParameter(":C_STA_ID",   OracleDbType.Varchar2, 100),
                new OracleParameter(":C_PRO_ID",   OracleDbType.Varchar2, 100),
                new OracleParameter(":N_CAPACITY", OracleDbType.Decimal,   15),
                new OracleParameter(":N_STATUS",   OracleDbType.Decimal,    1),
                new OracleParameter(":C_EMP_ID",   OracleDbType.Varchar2, 100),
                new OracleParameter(":D_MOD_DT",   OracleDbType.Date),
                new OracleParameter(":C_REMARK",   OracleDbType.Varchar2, 200)
            };
            parameters[0].Value = model.C_STA_ID;
            parameters[1].Value = model.C_PRO_ID;
            parameters[2].Value = model.N_CAPACITY;
            parameters[3].Value = model.N_STATUS;
            parameters[4].Value = model.C_EMP_ID;
            parameters[5].Value = model.D_MOD_DT;
            parameters[6].Value = model.C_REMARK;

            int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #11
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Mod_TQC_SPECIFIC_CONTENT model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into TQC_SPECIFIC_CONTENT(");
            strSql.Append("C_LR_BM,C_CONTENT,C_QX_BM,N_STATUS,C_REMARK,C_EMP_ID,D_MOD_DT)");
            strSql.Append(" values (");
            strSql.Append(":C_LR_BM,:C_CONTENT,:C_QX_BM,:N_STATUS,:C_REMARK,:C_EMP_ID,:D_MOD_DT)");
            OracleParameter[] parameters =
            {
                new OracleParameter(":C_LR_BM",   OracleDbType.Varchar2, 100),
                new OracleParameter(":C_CONTENT", OracleDbType.Varchar2, 100),
                new OracleParameter(":C_QX_BM",   OracleDbType.Varchar2, 100),
                new OracleParameter(":N_STATUS",  OracleDbType.Decimal,    1),
                new OracleParameter(":C_REMARK",  OracleDbType.Varchar2, 500),
                new OracleParameter(":C_EMP_ID",  OracleDbType.Varchar2, 100),
                new OracleParameter(":D_MOD_DT",  OracleDbType.Date)
            };
            parameters[0].Value = model.C_LR_BM;
            parameters[1].Value = model.C_CONTENT;
            parameters[2].Value = model.C_QX_BM;
            parameters[3].Value = model.N_STATUS;
            parameters[4].Value = model.C_REMARK;
            parameters[5].Value = model.C_EMP_ID;
            parameters[6].Value = model.D_MOD_DT;

            int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #12
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Mod_TPP_INITIALIZE_PRO_CAP model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into TPP_INITIALIZE_PRO_CAP(");
            strSql.Append("C_PRO_ID,C_PRO_CODE,C_PRO_DESC,C_INITIALIZE_ITEM_ID,N_CAPACITY,C_EMP_ID,D_MOD_DT)");
            strSql.Append(" values (");
            strSql.Append(":C_PRO_ID,:C_PRO_CODE,:C_PRO_DESC,:C_INITIALIZE_ITEM_ID,:N_CAPACITY,:C_EMP_ID,:D_MOD_DT)");
            OracleParameter[] parameters =
            {
                new OracleParameter(":C_PRO_ID",             OracleDbType.Varchar2, 100),
                new OracleParameter(":C_PRO_CODE",           OracleDbType.Varchar2, 100),
                new OracleParameter(":C_PRO_DESC",           OracleDbType.Varchar2, 100),
                new OracleParameter(":C_INITIALIZE_ITEM_ID", OracleDbType.Varchar2, 100),
                new OracleParameter(":N_CAPACITY",           OracleDbType.Decimal,   15),
                new OracleParameter(":C_EMP_ID",             OracleDbType.Varchar2, 100),
                new OracleParameter(":D_MOD_DT",             OracleDbType.Date)
            };
            parameters[0].Value = model.C_PRO_ID;
            parameters[1].Value = model.C_PRO_CODE;
            parameters[2].Value = model.C_PRO_DESC;
            parameters[3].Value = model.C_INITIALIZE_ITEM_ID;
            parameters[4].Value = model.N_CAPACITY;
            parameters[5].Value = model.C_EMP_ID;
            parameters[6].Value = model.D_MOD_DT;

            int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #13
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Mod_TMB_CON_TOL model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into TMB_CON_TOL(");
            strSql.Append("C_ID,N_MIN,N_MAX,N_NUM,C_REMARK,C_EMP_ID,D_MOD_DT)");
            strSql.Append(" values (");
            strSql.Append(":C_ID,:N_MIN,:N_MAX,:N_NUM,:C_REMARK,:C_EMP_ID,:D_MOD_DT)");
            OracleParameter[] parameters =
            {
                new OracleParameter(":C_ID",     OracleDbType.Varchar2, 100),
                new OracleParameter(":N_MIN",    OracleDbType.Decimal,    4),
                new OracleParameter(":N_MAX",    OracleDbType.Decimal,    4),
                new OracleParameter(":N_NUM",    OracleDbType.Double,     2),
                new OracleParameter(":C_REMARK", OracleDbType.Varchar2, 500),
                new OracleParameter(":C_EMP_ID", OracleDbType.Varchar2, 100),
                new OracleParameter(":D_MOD_DT", OracleDbType.Date)
            };
            parameters[0].Value = model.C_ID;
            parameters[1].Value = model.N_MIN;
            parameters[2].Value = model.N_MAX;
            parameters[3].Value = model.N_NUM;
            parameters[4].Value = model.C_REMARK;
            parameters[5].Value = model.C_EMP_ID;
            parameters[6].Value = model.D_MOD_DT;

            int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #14
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Mod_TQB_SAMP_ITEM_MODLE_JSZX model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into TQB_SAMP_ITEM_MODLE_JSZX(");
            strSql.Append("C_SAMP_MODLE_ID,C_SAMPLES_ID,C_SAM_NUM,N_STATUS,C_EMP_ID,D_MOD_DT,C_SAMPLES_NAME)");
            strSql.Append(" values (");
            strSql.Append(":C_SAMP_MODLE_ID,:C_SAMPLES_ID,:C_SAM_NUM,:N_STATUS,:C_EMP_ID,:D_MOD_DT,:C_SAMPLES_NAME)");
            OracleParameter[] parameters =
            {
                new OracleParameter(":C_SAMP_MODLE_ID", OracleDbType.Varchar2, 100),
                new OracleParameter(":C_SAMPLES_ID",    OracleDbType.Varchar2, 100),
                new OracleParameter(":C_SAM_NUM",       OracleDbType.Varchar2, 500),
                new OracleParameter(":N_STATUS",        OracleDbType.Decimal,    1),
                new OracleParameter(":C_EMP_ID",        OracleDbType.Varchar2, 100),
                new OracleParameter(":D_MOD_DT",        OracleDbType.Date),
                new OracleParameter(":C_SAMPLES_NAME",  OracleDbType.Varchar2, 100)
            };
            parameters[0].Value = model.C_SAMP_MODLE_ID;
            parameters[1].Value = model.C_SAMPLES_ID;
            parameters[2].Value = model.C_SAM_NUM;
            parameters[3].Value = model.N_STATUS;
            parameters[4].Value = model.C_EMP_ID;
            parameters[5].Value = model.D_MOD_DT;
            parameters[6].Value = model.C_SAMPLES_NAME;

            int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #15
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Mod_TRC_ROLL_PDD model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into TRC_ROLL_PDD(");
            strSql.Append("C_ID,C_CK,D_PDRQ,C_YSDH,D_INSERT,C_REMARK,N_STATUS)");
            strSql.Append(" values (");
            strSql.Append(":C_ID,:C_CK,:D_PDRQ,:C_YSDH,:D_INSERT,:C_REMARK,:N_STATUS)");
            OracleParameter[] parameters =
            {
                new OracleParameter(":C_ID",     OracleDbType.Varchar2, 100),
                new OracleParameter(":C_CK",     OracleDbType.Varchar2, 100),
                new OracleParameter(":D_PDRQ",   OracleDbType.Date),
                new OracleParameter(":C_YSDH",   OracleDbType.Varchar2, 100),
                new OracleParameter(":D_INSERT", OracleDbType.Date),
                new OracleParameter(":C_REMARK", OracleDbType.Varchar2, 500),
                new OracleParameter(":N_STATUS", OracleDbType.Decimal, 4)
            };
            parameters[0].Value = model.C_ID;
            parameters[1].Value = model.C_CK;
            parameters[2].Value = model.D_PDRQ;
            parameters[3].Value = model.C_YSDH;
            parameters[4].Value = model.D_INSERT;
            parameters[5].Value = model.C_REMARK;
            parameters[6].Value = model.N_STATUS;

            int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #16
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Mod_TQB_SAMPLING model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into TQB_SAMPLING(");
            strSql.Append("C_SAMPLING_CODE,C_SAMPLING_NAME,N_STATUS,C_REMARK,C_EMP_ID,N_SAMPLING_SN,C_CHECK_DEPMT)");
            strSql.Append(" values (");
            strSql.Append(":C_SAMPLING_CODE,:C_SAMPLING_NAME,:N_STATUS,:C_REMARK,:C_EMP_ID,:N_SAMPLING_SN,:C_CHECK_DEPMT)");
            OracleParameter[] parameters =
            {
                new OracleParameter(":C_SAMPLING_CODE", OracleDbType.Varchar2, 100),
                new OracleParameter(":C_SAMPLING_NAME", OracleDbType.Varchar2, 100),
                new OracleParameter(":N_STATUS",        OracleDbType.Decimal,    1),
                new OracleParameter(":C_REMARK",        OracleDbType.Varchar2, 500),
                new OracleParameter(":C_EMP_ID",        OracleDbType.Varchar2, 100),
                new OracleParameter(":N_SAMPLING_SN",   OracleDbType.Decimal,    1),
                new OracleParameter(":C_CHECK_DEPMT",   OracleDbType.Varchar2, 100)
            };

            parameters[0].Value = model.C_SAMPLING_CODE;
            parameters[1].Value = model.C_SAMPLING_NAME;
            parameters[2].Value = model.N_STATUS;
            parameters[3].Value = model.C_REMARK;
            parameters[4].Value = model.C_EMP_ID;
            parameters[5].Value = model.N_SAMPLING_SN;
            parameters[6].Value = model.C_CHECK_DEPMT;
            int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #17
0
        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(string C_ID)
        {
            //该表无主键信息,请自定义主键/条件字段
            StringBuilder strSql = new StringBuilder();

            strSql.Append("delete from TQC_WAREHOUSE_CHECK_SLAB ");
            strSql.Append(" where C_ID=:C_ID ");
            OracleParameter[] parameters =
            {
                new OracleParameter(":C_ID", OracleDbType.Varchar2, 100)
            };
            parameters[0].Value = C_ID;

            int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #18
0
ファイル: Dal_TB_BCBZGZ.cs プロジェクト: rcw0125/PCI20200819
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Mod_TB_BCBZGZ model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update TB_BCBZGZ set ");
            strSql.Append("C_ID=:C_ID,");
            strSql.Append("C_EMP_ID=:C_EMP_ID,");
            strSql.Append("D_MOD_DT=:D_MOD_DT,");
            strSql.Append("C_GZMC=:C_GZMC,");
            strSql.Append("C_GZ=:C_GZ");
            strSql.Append(" where ");
            OracleParameter[] parameters =
            {
                new OracleParameter(":C_ID",     OracleDbType.Varchar2, 100),
                new OracleParameter(":C_EMP_ID", OracleDbType.Varchar2, 100),
                new OracleParameter(":D_MOD_DT", OracleDbType.Date),
                new OracleParameter(":C_GZMC",   OracleDbType.Varchar2, 100),
                new OracleParameter(":C_GZ",     OracleDbType.Varchar2, 1000)
            };
            parameters[0].Value = model.C_ID;
            parameters[1].Value = model.C_EMP_ID;
            parameters[2].Value = model.D_MOD_DT;
            parameters[3].Value = model.C_GZMC;
            parameters[4].Value = model.C_GZ;

            int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #19
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Mod_TS_TABLE_INFO model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update TS_TABLE_INFO set ");
            strSql.Append("C_ID=:C_ID,");
            strSql.Append("C_TABLE_NAME=:C_TABLE_NAME,");
            strSql.Append("C_TABLE_DESC=:C_TABLE_DESC,");
            strSql.Append("C_CREATE_EMP=:C_CREATE_EMP,");
            strSql.Append("D_CREATE_DATE=:D_CREATE_DATE");
            strSql.Append(" where ");
            OracleParameter[] parameters =
            {
                new OracleParameter(":C_ID",          OracleDbType.Varchar2, 100),
                new OracleParameter(":C_TABLE_NAME",  OracleDbType.Varchar2, 100),
                new OracleParameter(":C_TABLE_DESC",  OracleDbType.Varchar2, 100),
                new OracleParameter(":C_CREATE_EMP",  OracleDbType.Varchar2, 100),
                new OracleParameter(":D_CREATE_DATE", OracleDbType.Date)
            };
            parameters[0].Value = model.C_ID;
            parameters[1].Value = model.C_TABLE_NAME;
            parameters[2].Value = model.C_TABLE_DESC;
            parameters[3].Value = model.C_CREATE_EMP;
            parameters[4].Value = model.D_CREATE_DATE;

            int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #20
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update_CX(string C_STOVE, string C_BATCH_NO, string C_STL_GRD, string C_SPEC, string C_STD_CODE, string C_PHYSICS_CODE, string strTime)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update TQC_RECHECK set ");
            strSql.Append("N_STATUS=0");
            strSql.Append(" where C_STOVE='" + C_STOVE + "' and");
            strSql.Append(" C_BATCH_NO='" + C_BATCH_NO + "' and ");
            strSql.Append(" C_STL_GRD='" + C_STL_GRD + "' and ");
            strSql.Append(" C_SPEC='" + C_SPEC + "'  and");
            strSql.Append(" C_STD_CODE='" + C_STD_CODE + "'  and ");
            strSql.Append(" C_PHYSICS_CODE='" + C_PHYSICS_CODE + "'  and n_is_qr=0 AND D_MOD_DT=TO_DATE('" + strTime + "','yyyy-mm-dd hh24:mi:ss') ");

            int rows = DbHelperOra.ExecuteSql(strSql.ToString());

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #21
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Mod_TQB_PHYSICS_CONFIGURE model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into TQB_PHYSICS_CONFIGURE(");
            strSql.Append("C_PHYSICS_GROUP_ID,C_CHARACTER_ID,N_STATUS,C_REMARK,C_EMP_ID,C_ORDER)");
            strSql.Append(" values (");
            strSql.Append(":C_PHYSICS_GROUP_ID,:C_CHARACTER_ID,:N_STATUS,:C_REMARK,:C_EMP_ID,:C_ORDER)");
            OracleParameter[] parameters =
            {
                new OracleParameter(":C_PHYSICS_GROUP_ID", OracleDbType.Varchar2, 100),
                new OracleParameter(":C_CHARACTER_ID",     OracleDbType.Varchar2, 100),
                new OracleParameter(":N_STATUS",           OracleDbType.Decimal,    1),
                new OracleParameter(":C_REMARK",           OracleDbType.Varchar2, 500),
                new OracleParameter(":C_EMP_ID",           OracleDbType.Varchar2, 100),
                new OracleParameter(":C_ORDER",            OracleDbType.Varchar2, 100),
            };

            parameters[0].Value = model.C_PHYSICS_GROUP_ID;
            parameters[1].Value = model.C_CHARACTER_ID;
            parameters[2].Value = model.N_STATUS;
            parameters[3].Value = model.C_REMARK;
            parameters[4].Value = model.C_EMP_ID;
            parameters[5].Value = model.C_ORDER;

            int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #22
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Mod_TSC_SLAB_MAIN_LOG model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into TSC_SLAB_MAIN_LOG(");
            strSql.Append("C_MAIN_ID,C_CKDH,N_STATUS,D_DATE,C_BC,C_BZ,C_EMP_ID)");
            strSql.Append(" values (");
            strSql.Append(":C_MAIN_ID,:C_CKDH,:N_STATUS,:D_DATE,:C_BC,:C_BZ,:C_EMP_ID)");
            OracleParameter[] parameters =
            {
                new OracleParameter(":C_MAIN_ID", OracleDbType.Varchar2, 100),
                new OracleParameter(":C_CKDH",    OracleDbType.Varchar2, 100),
                new OracleParameter(":N_STATUS",  OracleDbType.Int16,      1),
                new OracleParameter(":D_DATE",    OracleDbType.Date),
                new OracleParameter(":C_BC",      OracleDbType.Varchar2, 100),
                new OracleParameter(":C_BZ",      OracleDbType.Varchar2, 100),
                new OracleParameter(":C_EMP_ID",  OracleDbType.Varchar2, 100)
            };
            parameters[0].Value = model.C_MAIN_ID;
            parameters[1].Value = model.C_CKDH;
            parameters[2].Value = model.N_STATUS;
            parameters[3].Value = model.D_DATE;
            parameters[4].Value = model.C_BC;
            parameters[5].Value = model.C_BZ;
            parameters[6].Value = model.C_EMP_ID;
            int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #23
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Mod_TS_COMMON_COLUMN_INFO model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update TS_COMMON_COLUMN_INFO set ");
            strSql.Append("C_ID=:C_ID,");
            strSql.Append("C_COLUMN_NAME=:C_COLUMN_NAME,");
            strSql.Append("C_COLUMN_TYPE=:C_COLUMN_TYPE,");
            strSql.Append("C_COLUMN_COMMENTS=:C_COLUMN_COMMENTS,");
            strSql.Append("D_MOD_DATE=:D_MOD_DATE");
            strSql.Append(" where ");
            OracleParameter[] parameters =
            {
                new OracleParameter(":C_ID",              OracleDbType.Varchar2),
                new OracleParameter(":C_COLUMN_NAME",     OracleDbType.Varchar2),
                new OracleParameter(":C_COLUMN_TYPE",     OracleDbType.Varchar2),
                new OracleParameter(":C_COLUMN_COMMENTS", OracleDbType.Varchar2),
                new OracleParameter(":D_MOD_DATE",        OracleDbType.Date)
            };
            parameters[0].Value = model.C_ID;
            parameters[1].Value = model.C_COLUMN_NAME;
            parameters[2].Value = model.C_COLUMN_TYPE;
            parameters[3].Value = model.C_COLUMN_COMMENTS;
            parameters[4].Value = model.D_MOD_DATE;

            int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #24
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Mod_TB_NOT_LIMIT model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update TB_NOT_LIMIT set ");
            strSql.Append("C_ID=:C_ID,");
            strSql.Append("C_NAME=:C_NAME,");
            strSql.Append("C_MATCODE=:C_MATCODE,");
            strSql.Append("C_TYPE=:C_TYPE,");
            strSql.Append("C_EMP_ID=:C_EMP_ID");
            strSql.Append(" where ");
            OracleParameter[] parameters =
            {
                new OracleParameter(":C_ID",      OracleDbType.Varchar2, 100),
                new OracleParameter(":C_NAME",    OracleDbType.Varchar2, 100),
                new OracleParameter(":C_MATCODE", OracleDbType.Varchar2, 100),
                new OracleParameter(":C_TYPE",    OracleDbType.Decimal,    2),
                new OracleParameter(":C_EMP_ID",  OracleDbType.Varchar2, 100)
            };
            parameters[0].Value = model.C_ID;
            parameters[1].Value = model.C_NAME;
            parameters[2].Value = model.C_MATCODE;
            parameters[3].Value = model.C_TYPE;
            parameters[4].Value = model.C_EMP_ID;

            int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #25
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Mod_TPB_SLABWH_AREA model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into TPB_SLABWH_AREA(");
            strSql.Append("C_SLABWH_ID,C_SLABWH_AREA_CODE,C_SLABWH_AREA_NAME,D_END_DATE,C_REMARK,C_EMP_ID)");
            strSql.Append(" values (");
            strSql.Append(":C_SLABWH_ID,:C_SLABWH_AREA_CODE,:C_SLABWH_AREA_NAME,:D_END_DATE,:C_REMARK,:C_EMP_ID)");
            OracleParameter[] parameters =
            {
                new OracleParameter(":C_SLABWH_ID",        OracleDbType.Varchar2, 100),
                new OracleParameter(":C_SLABWH_AREA_CODE", OracleDbType.Varchar2, 100),
                new OracleParameter(":C_SLABWH_AREA_NAME", OracleDbType.Varchar2, 100),
                new OracleParameter(":D_END_DATE",         OracleDbType.Date),
                new OracleParameter(":C_REMARK",           OracleDbType.Varchar2, 200),
                new OracleParameter(":C_EMP_ID",           OracleDbType.Varchar2, 100)
            };
            parameters[0].Value = model.C_SLABWH_ID;
            parameters[1].Value = model.C_SLABWH_AREA_CODE;
            parameters[2].Value = model.C_SLABWH_AREA_NAME;
            parameters[3].Value = model.D_END_DATE;
            parameters[4].Value = model.C_REMARK;
            parameters[5].Value = model.C_EMP_ID;


            int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #26
0
ファイル: Dal_GPSJ.cs プロジェクト: rcw0125/PCI20200819
        /// <summary>
        /// 标记钢坯异常
        /// </summary>
        /// <param name="stove">炉号</param>
        /// <param name="matCode">物料编码</param>
        /// <param name="slabwhCode">货位</param>
        /// <param name="remark">异常原因</param>
        /// <param name="batchNo">开坯号</param>
        /// <returns>标记是否成功</returns>
        public bool UpdateSlabCancleYC(string stove, string matCode, string slabwhCode, string batchNo)
        {
            string sql = "";

            if (string.IsNullOrWhiteSpace(batchNo))
            {
                sql = @"UPDATE TSC_SLAB_MAIN TSM  SET TSM.C_KP_ID=''   WHERE TSM.C_STOVE='" + stove + "'  AND TSM.C_MAT_CODE='" + matCode + "' AND TSM.C_SLABWH_CODE='" + slabwhCode + "'";
            }
            else
            {
                sql = @"UPDATE TSC_SLAB_MAIN TSM  SET TSM.C_KP_ID=''   WHERE TSM.C_BATCH_NO='" + batchNo + "'  AND TSM.C_MAT_CODE='" + matCode + "' AND TSM.C_SLABWH_CODE='" + slabwhCode + "'";
            }

            int rows = DbHelperOra.ExecuteSql(sql);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #27
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Mod_TPP_INITIALIZE_ORDER model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into TPP_INITIALIZE_ORDER(");
            strSql.Append("C_INITIALIZE_ID,C_ORDER_ID,N_WGT,N_MACH_WGT,C_DESIGN_NO,C_RH,C_LF,C_KP,N_HL_TIME,C_HL,N_DFP_HL_TIME,C_DFP_HL,C_XM,C_ROLL_STA_ID,C_CCM_STA_ID,N_MACH_WGT_CCM,N_LGPC_STATUS,N_EXEC_STATUS,N_ROLL_PROD_WGT,N_SMS_PROD_WGT,C_REMARK,C_EMP_ID,C_EMP_NAME,C_MATRL_CODE_SLAB,C_MATRL_NAME_SLAB,C_SLAB_SIZE,N_SLAB_LENGTH,N_SLAB_PW,C_MATRL_CODE_KP,C_MATRL_NAME_KP,C_KP_SIZE,N_KP_LENGTH,N_KP_PW,C_ROUTE,N_GROUP,N_SORT,C_XC,C_SL,C_WL,C_ORDERNO,C_CONNO)");
            strSql.Append(" values (");
            strSql.Append(":C_INITIALIZE_ID,:C_ORDER_ID,:N_WGT,:N_MACH_WGT,:C_DESIGN_NO,:C_RH,:C_LF,:C_KP,:N_HL_TIME,:C_HL,:N_DFP_HL_TIME,:C_DFP_HL,:C_XM,:C_ROLL_STA_ID,:C_CCM_STA_ID,:N_MACH_WGT_CCM,:N_LGPC_STATUS,:N_EXEC_STATUS,:N_ROLL_PROD_WGT,:N_SMS_PROD_WGT,:C_REMARK,:C_EMP_ID,:C_EMP_NAME,:C_MATRL_CODE_SLAB,:C_MATRL_NAME_SLAB,:C_SLAB_SIZE,:N_SLAB_LENGTH,:N_SLAB_PW,:C_MATRL_CODE_KP,:C_MATRL_NAME_KP,:C_KP_SIZE,:N_KP_LENGTH,:N_KP_PW,:C_ROUTE,:N_GROUP,:N_SORT,:C_XC,:C_SL,:C_WL,:C_ORDERNO,:C_CONNO)");
            OracleParameter[] parameters =
            {
                new OracleParameter(":C_INITIALIZE_ID",   OracleDbType.Varchar2, 100),
                new OracleParameter(":C_ORDER_ID",        OracleDbType.Varchar2, 100),
                new OracleParameter(":N_WGT",             OracleDbType.Decimal,   15),
                new OracleParameter(":N_MACH_WGT",        OracleDbType.Decimal,   15),
                new OracleParameter(":C_DESIGN_NO",       OracleDbType.Varchar2, 100),
                new OracleParameter(":C_RH",              OracleDbType.Varchar2, 100),
                new OracleParameter(":C_LF",              OracleDbType.Varchar2, 100),
                new OracleParameter(":C_KP",              OracleDbType.Varchar2, 100),
                new OracleParameter(":N_HL_TIME",         OracleDbType.Decimal,    4),
                new OracleParameter(":C_HL",              OracleDbType.Varchar2, 100),
                new OracleParameter(":N_DFP_HL_TIME",     OracleDbType.Decimal,    4),
                new OracleParameter(":C_DFP_HL",          OracleDbType.Varchar2, 100),
                new OracleParameter(":C_XM",              OracleDbType.Varchar2, 100),
                new OracleParameter(":C_ROLL_STA_ID",     OracleDbType.Varchar2, 100),
                new OracleParameter(":C_CCM_STA_ID",      OracleDbType.Varchar2, 100),
                new OracleParameter(":N_MACH_WGT_CCM",    OracleDbType.Decimal,   15),
                new OracleParameter(":N_LGPC_STATUS",     OracleDbType.Decimal,    4),
                new OracleParameter(":N_EXEC_STATUS",     OracleDbType.Decimal,    4),
                new OracleParameter(":N_ROLL_PROD_WGT",   OracleDbType.Decimal,   15),
                new OracleParameter(":N_SMS_PROD_WGT",    OracleDbType.Decimal,   15),
                new OracleParameter(":C_REMARK",          OracleDbType.Varchar2, 500),
                new OracleParameter(":C_EMP_ID",          OracleDbType.Varchar2, 100),
                new OracleParameter(":C_EMP_NAME",        OracleDbType.Varchar2, 100),
                new OracleParameter(":C_MATRL_CODE_SLAB", OracleDbType.Varchar2, 100),
                new OracleParameter(":C_MATRL_NAME_SLAB", OracleDbType.Varchar2, 100),
                new OracleParameter(":C_SLAB_SIZE",       OracleDbType.Varchar2, 100),
                new OracleParameter(":N_SLAB_LENGTH",     OracleDbType.Decimal,   15),
                new OracleParameter(":N_SLAB_PW",         OracleDbType.Decimal,   15),
                new OracleParameter(":C_MATRL_CODE_KP",   OracleDbType.Varchar2, 100),
                new OracleParameter(":C_MATRL_NAME_KP",   OracleDbType.Varchar2, 100),
                new OracleParameter(":C_KP_SIZE",         OracleDbType.Varchar2, 100),
                new OracleParameter(":N_KP_LENGTH",       OracleDbType.Decimal,   15),
                new OracleParameter(":N_KP_PW",           OracleDbType.Decimal,   15),
                new OracleParameter(":C_ROUTE",           OracleDbType.Varchar2, 100),
                new OracleParameter(":N_GROUP",           OracleDbType.Decimal,    4),
                new OracleParameter(":N_SORT",            OracleDbType.Decimal,    4),
                new OracleParameter(":C_XC",              OracleDbType.Varchar2,  10),
                new OracleParameter(":C_SL",              OracleDbType.Varchar2,  10),
                new OracleParameter(":C_WL",              OracleDbType.Varchar2,  10),
                new OracleParameter(":C_ORDERNO",         OracleDbType.Varchar2, 100),
                new OracleParameter(":C_CONNO",           OracleDbType.Varchar2, 100)
            };
            parameters[0].Value  = model.C_INITIALIZE_ID;
            parameters[1].Value  = model.C_ORDER_ID;
            parameters[2].Value  = model.N_WGT;
            parameters[3].Value  = model.N_MACH_WGT;
            parameters[4].Value  = model.C_DESIGN_NO;
            parameters[5].Value  = model.C_RH;
            parameters[6].Value  = model.C_LF;
            parameters[7].Value  = model.C_KP;
            parameters[8].Value  = model.N_HL_TIME;
            parameters[9].Value  = model.C_HL;
            parameters[10].Value = model.N_DFP_HL_TIME;
            parameters[11].Value = model.C_DFP_HL;
            parameters[12].Value = model.C_XM;
            parameters[13].Value = model.C_ROLL_STA_ID;
            parameters[14].Value = model.C_CCM_STA_ID;
            parameters[15].Value = model.N_MACH_WGT_CCM;
            parameters[16].Value = model.N_LGPC_STATUS;
            parameters[17].Value = model.N_EXEC_STATUS;
            parameters[18].Value = model.N_ROLL_PROD_WGT;
            parameters[19].Value = model.N_SMS_PROD_WGT;
            parameters[20].Value = model.C_REMARK;
            parameters[21].Value = model.C_EMP_ID;
            parameters[22].Value = model.C_EMP_NAME;
            parameters[23].Value = model.C_MATRL_CODE_SLAB;
            parameters[24].Value = model.C_MATRL_NAME_SLAB;
            parameters[25].Value = model.C_SLAB_SIZE;
            parameters[26].Value = model.N_SLAB_LENGTH;
            parameters[27].Value = model.N_SLAB_PW;
            parameters[28].Value = model.C_MATRL_CODE_KP;
            parameters[29].Value = model.C_MATRL_NAME_KP;
            parameters[30].Value = model.C_KP_SIZE;
            parameters[31].Value = model.N_KP_LENGTH;
            parameters[32].Value = model.N_KP_PW;
            parameters[33].Value = model.C_ROUTE;
            parameters[34].Value = model.N_GROUP;
            parameters[35].Value = model.N_SORT;
            parameters[36].Value = model.C_XC;
            parameters[37].Value = model.C_SL;
            parameters[38].Value = model.C_WL;
            parameters[39].Value = model.C_ORDERNO;
            parameters[40].Value = model.C_CONNO;

            int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #28
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Mod_TPA_HL_PLAN model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into TPA_HL_PLAN(");
            strSql.Append("C_ID,C_FK,C_STOVE_NO,C_STL_GRD,C_STD_CODE,C_WH_CODE,C_SLAB_TYPE,D_START_TIME,D_END_TIME,N_HL_TIME,D_PLAN_DATE,C_HLYQ,C_REMARK,N_STATUS,C_CCM,N_QUA,N_CAP,N_TOTAL_QUA,D_START_TIME_SJ,D_END_TIME_SJ,N_QUA_SJ,C_WH_CODE_SJ,D_OVER_TIME,N_NUM)");
            strSql.Append(" values (");
            strSql.Append(":C_ID,:C_FK,:C_STOVE_NO,:C_STL_GRD,:C_STD_CODE,:C_WH_CODE,:C_SLAB_TYPE,:D_START_TIME,:D_END_TIME,:N_HL_TIME,:D_PLAN_DATE,:C_HLYQ,:C_REMARK,:N_STATUS,:C_CCM,:N_QUA,:N_CAP,:N_TOTAL_QUA,:D_START_TIME_SJ,:D_END_TIME_SJ,:N_QUA_SJ,:C_WH_CODE_SJ,:D_OVER_TIME,:N_NUM)");
            OracleParameter[] parameters =
            {
                new OracleParameter(":C_ID",            OracleDbType.Varchar2,  50),
                new OracleParameter(":C_FK",            OracleDbType.Varchar2,  50),
                new OracleParameter(":C_STOVE_NO",      OracleDbType.Varchar2,  50),
                new OracleParameter(":C_STL_GRD",       OracleDbType.Varchar2,  50),
                new OracleParameter(":C_STD_CODE",      OracleDbType.Varchar2,  50),
                new OracleParameter(":C_WH_CODE",       OracleDbType.Varchar2,  50),
                new OracleParameter(":C_SLAB_TYPE",     OracleDbType.Varchar2,  50),
                new OracleParameter(":D_START_TIME",    OracleDbType.Date),
                new OracleParameter(":D_END_TIME",      OracleDbType.Date),
                new OracleParameter(":N_HL_TIME",       OracleDbType.Decimal,   10),
                new OracleParameter(":D_PLAN_DATE",     OracleDbType.Date),
                new OracleParameter(":C_HLYQ",          OracleDbType.Varchar2, 500),
                new OracleParameter(":C_REMARK",        OracleDbType.Varchar2, 500),
                new OracleParameter(":N_STATUS",        OracleDbType.Decimal,    5),
                new OracleParameter(":C_CCM",           OracleDbType.Varchar2,  50),
                new OracleParameter(":N_QUA",           OracleDbType.Decimal,   10),
                new OracleParameter(":N_CAP",           OracleDbType.Decimal,   10),
                new OracleParameter(":N_TOTAL_QUA",     OracleDbType.Decimal,   10),
                new OracleParameter(":D_START_TIME_SJ", OracleDbType.Date),
                new OracleParameter(":D_END_TIME_SJ",   OracleDbType.Date),
                new OracleParameter(":N_QUA_SJ",        OracleDbType.Decimal,   10),
                new OracleParameter(":C_WH_CODE_SJ",    OracleDbType.Varchar2,  50),
                new OracleParameter(":D_OVER_TIME",     OracleDbType.Date),
                new OracleParameter(":N_NUM",           OracleDbType.Decimal, 10)
            };
            parameters[0].Value  = model.C_ID;
            parameters[1].Value  = model.C_FK;
            parameters[2].Value  = model.C_STOVE_NO;
            parameters[3].Value  = model.C_STL_GRD;
            parameters[4].Value  = model.C_STD_CODE;
            parameters[5].Value  = model.C_WH_CODE;
            parameters[6].Value  = model.C_SLAB_TYPE;
            parameters[7].Value  = model.D_START_TIME;
            parameters[8].Value  = model.D_END_TIME;
            parameters[9].Value  = model.N_HL_TIME;
            parameters[10].Value = model.D_PLAN_DATE;
            parameters[11].Value = model.C_HLYQ;
            parameters[12].Value = model.C_REMARK;
            parameters[13].Value = model.N_STATUS;
            parameters[14].Value = model.C_CCM;
            parameters[15].Value = model.N_QUA;
            parameters[16].Value = model.N_CAP;
            parameters[17].Value = model.N_TOTAL_QUA;
            parameters[18].Value = model.D_START_TIME_SJ;
            parameters[19].Value = model.D_END_TIME_SJ;
            parameters[20].Value = model.N_QUA_SJ;
            parameters[21].Value = model.C_WH_CODE_SJ;
            parameters[22].Value = model.D_OVER_TIME;
            parameters[23].Value = model.N_NUM;

            int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #29
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Mod_TPP_INITIALIZE_ORDER model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update TPP_INITIALIZE_ORDER set ");
            strSql.Append("C_INITIALIZE_ID=:C_INITIALIZE_ID,");
            strSql.Append("C_ORDER_ID=:C_ORDER_ID,");
            strSql.Append("N_WGT=:N_WGT,");
            strSql.Append("N_MACH_WGT=:N_MACH_WGT,");
            strSql.Append("C_DESIGN_NO=:C_DESIGN_NO,");
            strSql.Append("N_STATUS=:N_STATUS,");
            strSql.Append("N_FLAG=:N_FLAG,");
            strSql.Append("C_RH=:C_RH,");
            strSql.Append("C_LF=:C_LF,");
            strSql.Append("C_KP=:C_KP,");
            strSql.Append("N_HL_TIME=:N_HL_TIME,");
            strSql.Append("C_HL=:C_HL,");
            strSql.Append("N_DFP_HL_TIME=:N_DFP_HL_TIME,");
            strSql.Append("C_DFP_HL=:C_DFP_HL,");
            strSql.Append("C_XM=:C_XM,");
            strSql.Append("C_ROLL_STA_ID=:C_ROLL_STA_ID,");
            strSql.Append("C_CCM_STA_ID=:C_CCM_STA_ID,");
            strSql.Append("N_MACH_WGT_CCM=:N_MACH_WGT_CCM,");
            strSql.Append("N_LGPC_STATUS=:N_LGPC_STATUS,");
            strSql.Append("N_EXEC_STATUS=:N_EXEC_STATUS,");
            strSql.Append("N_ROLL_PROD_WGT=:N_ROLL_PROD_WGT,");
            strSql.Append("N_SMS_PROD_WGT=:N_SMS_PROD_WGT,");
            strSql.Append("C_REMARK=:C_REMARK,");
            strSql.Append("C_EMP_ID=:C_EMP_ID,");
            strSql.Append("C_EMP_NAME=:C_EMP_NAME,");
            strSql.Append("D_MOD_DT=:D_MOD_DT,");
            strSql.Append("C_MATRL_CODE_SLAB=:C_MATRL_CODE_SLAB,");
            strSql.Append("C_MATRL_NAME_SLAB=:C_MATRL_NAME_SLAB,");
            strSql.Append("C_SLAB_SIZE=:C_SLAB_SIZE,");
            strSql.Append("N_SLAB_LENGTH=:N_SLAB_LENGTH,");
            strSql.Append("N_SLAB_PW=:N_SLAB_PW,");
            strSql.Append("C_MATRL_CODE_KP=:C_MATRL_CODE_KP,");
            strSql.Append("C_MATRL_NAME_KP=:C_MATRL_NAME_KP,");
            strSql.Append("C_KP_SIZE=:C_KP_SIZE,");
            strSql.Append("N_KP_LENGTH=:N_KP_LENGTH,");
            strSql.Append("N_KP_PW=:N_KP_PW,");
            strSql.Append("C_ROUTE=:C_ROUTE,");
            strSql.Append("N_GROUP=:N_GROUP,");
            strSql.Append("N_SORT=:N_SORT,");
            strSql.Append("C_XC=:C_XC,");
            strSql.Append("C_SL=:C_SL,");
            strSql.Append("C_WL=:C_WL,");
            strSql.Append("C_ORDERNO=:C_ORDERNO,");
            strSql.Append("C_CONNO=:C_CONNO");
            strSql.Append(" where C_ID=:C_ID ");
            OracleParameter[] parameters =
            {
                new OracleParameter(":C_INITIALIZE_ID",   OracleDbType.Varchar2, 100),
                new OracleParameter(":C_ORDER_ID",        OracleDbType.Varchar2, 100),
                new OracleParameter(":N_WGT",             OracleDbType.Decimal,   15),
                new OracleParameter(":N_MACH_WGT",        OracleDbType.Decimal,   15),
                new OracleParameter(":C_DESIGN_NO",       OracleDbType.Varchar2, 100),
                new OracleParameter(":N_STATUS",          OracleDbType.Decimal,    4),
                new OracleParameter(":N_FLAG",            OracleDbType.Decimal,    4),
                new OracleParameter(":C_RH",              OracleDbType.Varchar2, 100),
                new OracleParameter(":C_LF",              OracleDbType.Varchar2, 100),
                new OracleParameter(":C_KP",              OracleDbType.Varchar2, 100),
                new OracleParameter(":N_HL_TIME",         OracleDbType.Decimal,    4),
                new OracleParameter(":C_HL",              OracleDbType.Varchar2, 100),
                new OracleParameter(":N_DFP_HL_TIME",     OracleDbType.Decimal,    4),
                new OracleParameter(":C_DFP_HL",          OracleDbType.Varchar2, 100),
                new OracleParameter(":C_XM",              OracleDbType.Varchar2, 100),
                new OracleParameter(":C_ROLL_STA_ID",     OracleDbType.Varchar2, 100),
                new OracleParameter(":C_CCM_STA_ID",      OracleDbType.Varchar2, 100),
                new OracleParameter(":N_MACH_WGT_CCM",    OracleDbType.Decimal,   15),
                new OracleParameter(":N_LGPC_STATUS",     OracleDbType.Decimal,    4),
                new OracleParameter(":N_EXEC_STATUS",     OracleDbType.Decimal,    4),
                new OracleParameter(":N_ROLL_PROD_WGT",   OracleDbType.Decimal,   15),
                new OracleParameter(":N_SMS_PROD_WGT",    OracleDbType.Decimal,   15),
                new OracleParameter(":C_REMARK",          OracleDbType.Varchar2, 500),
                new OracleParameter(":C_EMP_ID",          OracleDbType.Varchar2, 100),
                new OracleParameter(":C_EMP_NAME",        OracleDbType.Varchar2, 100),
                new OracleParameter(":D_MOD_DT",          OracleDbType.Date),
                new OracleParameter(":C_MATRL_CODE_SLAB", OracleDbType.Varchar2, 100),
                new OracleParameter(":C_MATRL_NAME_SLAB", OracleDbType.Varchar2, 100),
                new OracleParameter(":C_SLAB_SIZE",       OracleDbType.Varchar2, 100),
                new OracleParameter(":N_SLAB_LENGTH",     OracleDbType.Decimal,   15),
                new OracleParameter(":N_SLAB_PW",         OracleDbType.Decimal,   15),
                new OracleParameter(":C_MATRL_CODE_KP",   OracleDbType.Varchar2, 100),
                new OracleParameter(":C_MATRL_NAME_KP",   OracleDbType.Varchar2, 100),
                new OracleParameter(":C_KP_SIZE",         OracleDbType.Varchar2, 100),
                new OracleParameter(":N_KP_LENGTH",       OracleDbType.Decimal,   15),
                new OracleParameter(":N_KP_PW",           OracleDbType.Decimal,   15),
                new OracleParameter(":C_ROUTE",           OracleDbType.Varchar2, 100),
                new OracleParameter(":N_GROUP",           OracleDbType.Decimal,    4),
                new OracleParameter(":N_SORT",            OracleDbType.Decimal,    4),
                new OracleParameter(":C_XC",              OracleDbType.Varchar2,  10),
                new OracleParameter(":C_SL",              OracleDbType.Varchar2,  10),
                new OracleParameter(":C_WL",              OracleDbType.Varchar2,  10),
                new OracleParameter(":C_ORDERNO",         OracleDbType.Varchar2, 100),
                new OracleParameter(":C_CONNO",           OracleDbType.Varchar2, 100),
                new OracleParameter(":C_ID",              OracleDbType.Varchar2, 100)
            };
            parameters[0].Value  = model.C_INITIALIZE_ID;
            parameters[1].Value  = model.C_ORDER_ID;
            parameters[2].Value  = model.N_WGT;
            parameters[3].Value  = model.N_MACH_WGT;
            parameters[4].Value  = model.C_DESIGN_NO;
            parameters[5].Value  = model.N_STATUS;
            parameters[6].Value  = model.N_FLAG;
            parameters[7].Value  = model.C_RH;
            parameters[8].Value  = model.C_LF;
            parameters[9].Value  = model.C_KP;
            parameters[10].Value = model.N_HL_TIME;
            parameters[11].Value = model.C_HL;
            parameters[12].Value = model.N_DFP_HL_TIME;
            parameters[13].Value = model.C_DFP_HL;
            parameters[14].Value = model.C_XM;
            parameters[15].Value = model.C_ROLL_STA_ID;
            parameters[16].Value = model.C_CCM_STA_ID;
            parameters[17].Value = model.N_MACH_WGT_CCM;
            parameters[18].Value = model.N_LGPC_STATUS;
            parameters[19].Value = model.N_EXEC_STATUS;
            parameters[20].Value = model.N_ROLL_PROD_WGT;
            parameters[21].Value = model.N_SMS_PROD_WGT;
            parameters[22].Value = model.C_REMARK;
            parameters[23].Value = model.C_EMP_ID;
            parameters[24].Value = model.C_EMP_NAME;
            parameters[25].Value = model.D_MOD_DT;
            parameters[26].Value = model.C_MATRL_CODE_SLAB;
            parameters[27].Value = model.C_MATRL_NAME_SLAB;
            parameters[28].Value = model.C_SLAB_SIZE;
            parameters[29].Value = model.N_SLAB_LENGTH;
            parameters[30].Value = model.N_SLAB_PW;
            parameters[31].Value = model.C_MATRL_CODE_KP;
            parameters[32].Value = model.C_MATRL_NAME_KP;
            parameters[33].Value = model.C_KP_SIZE;
            parameters[34].Value = model.N_KP_LENGTH;
            parameters[35].Value = model.N_KP_PW;
            parameters[36].Value = model.C_ROUTE;
            parameters[37].Value = model.N_GROUP;
            parameters[38].Value = model.N_SORT;
            parameters[39].Value = model.C_XC;
            parameters[40].Value = model.C_SL;
            parameters[41].Value = model.C_WL;
            parameters[42].Value = model.C_ORDERNO;
            parameters[43].Value = model.C_CONNO;
            parameters[44].Value = model.C_ID;

            int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #30
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Mod_TPA_HL_PLAN model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update TPA_HL_PLAN set ");
            strSql.Append("C_FK=:C_FK,");
            strSql.Append("C_STOVE_NO=:C_STOVE_NO,");
            strSql.Append("C_STL_GRD=:C_STL_GRD,");
            strSql.Append("C_STD_CODE=:C_STD_CODE,");
            strSql.Append("C_WH_CODE=:C_WH_CODE,");
            strSql.Append("C_SLAB_TYPE=:C_SLAB_TYPE,");
            strSql.Append("D_START_TIME=:D_START_TIME,");
            strSql.Append("D_END_TIME=:D_END_TIME,");
            strSql.Append("N_HL_TIME=:N_HL_TIME,");
            strSql.Append("D_PLAN_DATE=:D_PLAN_DATE,");
            strSql.Append("C_HLYQ=:C_HLYQ,");
            strSql.Append("C_REMARK=:C_REMARK,");
            strSql.Append("N_STATUS=:N_STATUS,");
            strSql.Append("C_CCM=:C_CCM,");
            strSql.Append("N_QUA=:N_QUA,");
            strSql.Append("N_CAP=:N_CAP,");
            strSql.Append("N_TOTAL_QUA=:N_TOTAL_QUA,");
            strSql.Append("D_START_TIME_SJ=:D_START_TIME_SJ,");
            strSql.Append("D_END_TIME_SJ=:D_END_TIME_SJ,");
            strSql.Append("N_QUA_SJ=:N_QUA_SJ,");
            strSql.Append("C_WH_CODE_SJ=:C_WH_CODE_SJ,");
            strSql.Append("D_OVER_TIME=:D_OVER_TIME,");
            strSql.Append("N_NUM=:N_NUM");
            strSql.Append(" where C_ID=:C_ID ");
            OracleParameter[] parameters =
            {
                new OracleParameter(":C_FK",            OracleDbType.Varchar2,  50),
                new OracleParameter(":C_STOVE_NO",      OracleDbType.Varchar2,  50),
                new OracleParameter(":C_STL_GRD",       OracleDbType.Varchar2,  50),
                new OracleParameter(":C_STD_CODE",      OracleDbType.Varchar2,  50),
                new OracleParameter(":C_WH_CODE",       OracleDbType.Varchar2,  50),
                new OracleParameter(":C_SLAB_TYPE",     OracleDbType.Varchar2,  50),
                new OracleParameter(":D_START_TIME",    OracleDbType.Date),
                new OracleParameter(":D_END_TIME",      OracleDbType.Date),
                new OracleParameter(":N_HL_TIME",       OracleDbType.Decimal,   10),
                new OracleParameter(":D_PLAN_DATE",     OracleDbType.Date),
                new OracleParameter(":C_HLYQ",          OracleDbType.Varchar2, 500),
                new OracleParameter(":C_REMARK",        OracleDbType.Varchar2, 500),
                new OracleParameter(":N_STATUS",        OracleDbType.Decimal,    5),
                new OracleParameter(":C_CCM",           OracleDbType.Varchar2,  50),
                new OracleParameter(":N_QUA",           OracleDbType.Decimal,   10),
                new OracleParameter(":N_CAP",           OracleDbType.Decimal,   10),
                new OracleParameter(":N_TOTAL_QUA",     OracleDbType.Decimal,   10),
                new OracleParameter(":D_START_TIME_SJ", OracleDbType.Date),
                new OracleParameter(":D_END_TIME_SJ",   OracleDbType.Date),
                new OracleParameter(":N_QUA_SJ",        OracleDbType.Decimal,   10),
                new OracleParameter(":C_WH_CODE_SJ",    OracleDbType.Varchar2,  50),
                new OracleParameter(":D_OVER_TIME",     OracleDbType.Date),
                new OracleParameter(":N_NUM",           OracleDbType.Decimal,   10),
                new OracleParameter(":C_ID",            OracleDbType.Varchar2, 50)
            };
            parameters[0].Value  = model.C_FK;
            parameters[1].Value  = model.C_STOVE_NO;
            parameters[2].Value  = model.C_STL_GRD;
            parameters[3].Value  = model.C_STD_CODE;
            parameters[4].Value  = model.C_WH_CODE;
            parameters[5].Value  = model.C_SLAB_TYPE;
            parameters[6].Value  = model.D_START_TIME;
            parameters[7].Value  = model.D_END_TIME;
            parameters[8].Value  = model.N_HL_TIME;
            parameters[9].Value  = model.D_PLAN_DATE;
            parameters[10].Value = model.C_HLYQ;
            parameters[11].Value = model.C_REMARK;
            parameters[12].Value = model.N_STATUS;
            parameters[13].Value = model.C_CCM;
            parameters[14].Value = model.N_QUA;
            parameters[15].Value = model.N_CAP;
            parameters[16].Value = model.N_TOTAL_QUA;
            parameters[17].Value = model.D_START_TIME_SJ;
            parameters[18].Value = model.D_END_TIME_SJ;
            parameters[19].Value = model.N_QUA_SJ;
            parameters[20].Value = model.C_WH_CODE_SJ;
            parameters[21].Value = model.D_OVER_TIME;
            parameters[22].Value = model.N_NUM;
            parameters[23].Value = model.C_ID;

            int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }