示例#1
0
        public List <DataSevenVo> connection8(string _val, string _workCenter)
        {
            List <DataSevenVo> resultList = new List <DataSevenVo>();

            try
            {
                foreach (string line in File.ReadLines("C:\\DEV\\server.txt", Encoding.UTF8))
                {
                    oraCon = line;
                }
                using (OracleConnection conn = new OracleConnection(oraCon))
                {
                    conn.Open();
                    string        sql  = new MyXMLReader().Read("sqlProcessList");
                    OracleCommand comm = new OracleCommand();
                    comm.CommandType = CommandType.Text;
                    comm.Connection  = conn;
                    comm.CommandText = sql;
                    comm.Parameters.Add("eqp_id", _val);
                    //comm.Parameters.Add("work_center", _workCenter);
                    using (OracleDataReader rdr = comm.ExecuteReader())
                    {
                        while (rdr.Read())
                        {
                            DataSevenVo vo = new DataSevenVo()
                            {
                                SITE         = rdr.GetValue(rdr.GetOrdinal("SITE")),
                                EQP_ID       = rdr.GetValue(rdr.GetOrdinal("EQP_ID")),
                                EQP_NO       = rdr.GetValue(rdr.GetOrdinal("EQP_NO")),
                                PROCESS_DESC = rdr.GetValue(rdr.GetOrdinal("PROCESS_DESC")),
                                PROCESS_SEQ  = rdr.GetValue(rdr.GetOrdinal("PROCESS_SEQ")),
                                PROCESS_NAME = rdr.GetValue(rdr.GetOrdinal("PROCESS_NAME")),
                                LEB          = rdr.GetValue(rdr.GetOrdinal("LEB")),
                                CURRENTPROC  = rdr.GetValue(rdr.GetOrdinal("CURRENTPROC"))
                            };
                            resultList.Add(vo);
                        }
                    }
                    conn.Close();
                }
            }
            catch (Exception exception)
            {
                MessageBox.Show(exception.Message);
            }
            return(resultList);
        }
示例#2
0
        public List <DataSevenVo> connectionProcessComaparence(string _partNumber)
        {
            List <DataSevenVo> resultList = new List <DataSevenVo>();

            try
            {
                foreach (string line in File.ReadLines("C:\\DEV\\server.txt", Encoding.UTF8))
                {
                    oraCon = line;
                }
                using (OracleConnection conn = new OracleConnection(oraCon))
                {
                    conn.Open();
                    string        sql  = new MyXMLReader().Read("sqlProcessComparence2");
                    OracleCommand comm = new OracleCommand();
                    comm.CommandType = CommandType.Text;
                    comm.Connection  = conn;
                    comm.CommandText = sql;
                    comm.Parameters.Add("PART_NUMBER", _partNumber);
                    //comm.Parameters.Add("work_center", _workCenter);
                    using (OracleDataReader rdr = comm.ExecuteReader())
                    {
                        while (rdr.Read())
                        {
                            DataSevenVo vo = new DataSevenVo()
                            {
                                SITE              = rdr.GetValue(rdr.GetOrdinal("SITE")),
                                EQP_ID            = rdr.GetValue(rdr.GetOrdinal("EQP_ID")),
                                WORK_CENTER       = rdr.GetValue(rdr.GetOrdinal("WORK_CENTER")),
                                PART_NUMBER       = rdr.GetValue(rdr.GetOrdinal("PART_NUMBER")),
                                PROD_ORDER_NUMBER = rdr.GetValue(rdr.GetOrdinal("PROD_ORDER_NUMBER")),
                                ORDER_COUNT       = rdr.GetValue(rdr.GetOrdinal("ORDER_COUNT")),
                                CHK  = "False",
                                CHK2 = "False"
                            };
                            resultList.Add(vo);
                        }
                    }
                    conn.Close();
                }
            }
            catch (Exception exception)
            {
                MessageBox.Show(exception.Message);
            }
            return(resultList);
        }
示例#3
0
        public List <DataSevenVo> connection7(string _val, string _workCenter)
        {
            List <DataSevenVo> resultList = new List <DataSevenVo>();

            try
            {
                foreach (string line in File.ReadLines("C:\\DEV\\server.txt", Encoding.UTF8))
                {
                    oraCon = line;
                }
                using (OracleConnection conn = new OracleConnection(oraCon))
                {
                    conn.Open();
                    string        sql  = new MyXMLReader().Read("sqlseven");
                    OracleCommand comm = new OracleCommand();
                    comm.CommandType = CommandType.Text;
                    comm.Connection  = conn;
                    comm.CommandText = sql;
                    comm.Parameters.Add("eqp_id", _val);
                    comm.Parameters.Add("work_center", _workCenter);
                    using (OracleDataReader rdr = comm.ExecuteReader())
                    {
                        while (rdr.Read())
                        {
                            DataSevenVo vo = new DataSevenVo()
                            {
                                CHK                      = rdr.GetValue(rdr.GetOrdinal("CHK")),
                                NP_FLAG                  = rdr.GetValue(rdr.GetOrdinal("NP_FLAG")),
                                STAY_DURATION            = rdr.GetValue(rdr.GetOrdinal("STAY_DURATION")),
                                DURATI                   = rdr.GetValue(rdr.GetOrdinal("DURATI")),
                                CAPACITY                 = rdr.GetValue(rdr.GetOrdinal("CAPACITY")),
                                SCRAP_QTY                = rdr.GetValue(rdr.GetOrdinal("SCRAP_QTY")),
                                LOT_ID                   = rdr.GetValue(rdr.GetOrdinal("LOT_ID")),
                                PLAN_NAME                = rdr.GetValue(rdr.GetOrdinal("PLAN_NAME")),
                                PLAN_VERSION             = rdr.GetValue(rdr.GetOrdinal("PLAN_VERSION")),
                                PRODUCT_NAME             = rdr.GetValue(rdr.GetOrdinal("PRODUCT_NAME")),
                                PRODUCT_REVISION         = rdr.GetValue(rdr.GetOrdinal("PRODUCT_REVISION")),
                                PRODUCT_DESC             = rdr.GetValue(rdr.GetOrdinal("PRODUCT_DESC")),
                                SALES_ORDER_NUMBER       = rdr.GetValue(rdr.GetOrdinal("SALES_ORDER_NUMBER")),
                                PROD_ORDER_NUMBER        = rdr.GetValue(rdr.GetOrdinal("PROD_ORDER_NUMBER")),
                                ORDER_QTY                = rdr.GetValue(rdr.GetOrdinal("ORDER_QTY")),
                                PARENT_PROD_ORDER_NUMBER = rdr.GetValue(rdr.GetOrdinal("PARENT_PROD_ORDER_NUMBER")),
                                START_QTY                = rdr.GetValue(rdr.GetOrdinal("START_QTY")),
                                CURRENT_QTY              = rdr.GetValue(rdr.GetOrdinal("CURRENT_QTY")),
                                END_QTY                  = rdr.GetValue(rdr.GetOrdinal("END_QTY")),
                                STATUS                   = rdr.GetValue(rdr.GetOrdinal("STATUS")),
                                PARENT_LOT_ID            = rdr.GetValue(rdr.GetOrdinal("PARENT_LOT_ID")),
                                REPRC_FLAG               = rdr.GetValue(rdr.GetOrdinal("REPRC_FLAG")),
                                START_DATE_TIME          = rdr.GetValue(rdr.GetOrdinal("START_DATE_TIME")),
                                END_DATE_TIME            = rdr.GetValue(rdr.GetOrdinal("END_DATE_TIME")),
                                PRIORITY                 = rdr.GetValue(rdr.GetOrdinal("PRIORITY")),
                                PROCESS_NAME             = rdr.GetValue(rdr.GetOrdinal("PROCESS_NAME")),
                                PROCESS_SEQ              = rdr.GetValue(rdr.GetOrdinal("PROCESS_SEQ")),
                                PROCESS_DESC             = rdr.GetValue(rdr.GetOrdinal("PROCESS_DESC")),
                                LOT_TYPE                 = rdr.GetValue(rdr.GetOrdinal("LOT_TYPE")),
                                SITE                     = rdr.GetValue(rdr.GetOrdinal("SITE")),
                                WIP_DUE_DATE             = rdr.GetValue(rdr.GetOrdinal("WIP_DUE_DATE")),
                                ERP_IF_FLAG              = rdr.GetValue(rdr.GetOrdinal("ERP_IF_FLAG")),
                                EQP_LOTSN                = rdr.GetValue(rdr.GetOrdinal("EQP_LOTSN")),
                                EQP_LOTSN_SEQ            = rdr.GetValue(rdr.GetOrdinal("EQP_LOTSN_SEQ")),
                                EQP_BATCH_TYPE           = rdr.GetValue(rdr.GetOrdinal("EQP_BATCH_TYPE")),
                                ORG_LOT_ID               = rdr.GetValue(rdr.GetOrdinal("ORG_LOT_ID")),
                                WORK_CENTER              = rdr.GetValue(rdr.GetOrdinal("WORK_CENTER")),
                                EQP_ID                   = rdr.GetValue(rdr.GetOrdinal("EQP_ID")),
                                EQP_NO                   = rdr.GetValue(rdr.GetOrdinal("EQP_NO")),
                                EQP_BATCH_ID             = rdr.GetValue(rdr.GetOrdinal("EQP_BATCH_ID")),
                                PREV_UNIT_WEIGHT         = rdr.GetValue(rdr.GetOrdinal("PREV_UNIT_WEIGHT")),
                                SPLIT_SEQ                = rdr.GetValue(rdr.GetOrdinal("SPLIT_SEQ")),
                                CREATE_DATE_TIME         = rdr.GetValue(rdr.GetOrdinal("CREATE_DATE_TIME")),
                                INCOMING_QTY             = rdr.GetValue(rdr.GetOrdinal("INCOMING_QTY")),
                                STAY_REASON              = rdr.GetValue(rdr.GetOrdinal("STAY_REASON")),
                                MAT_DOC_NUMBER           = rdr.GetValue(rdr.GetOrdinal("MAT_DOC_NUMBER")),
                                MAT_YEAR                 = rdr.GetValue(rdr.GetOrdinal("MAT_YEAR")),
                                MAT_DOC_ITEM             = rdr.GetValue(rdr.GetOrdinal("MAT_DOC_ITEM")),
                                SPECIAL_TREAT            = rdr.GetValue(rdr.GetOrdinal("SPECIAL_TREAT")),
                                PROD_ORDER_SPEC          = rdr.GetValue(rdr.GetOrdinal("PROD_ORDER_SPEC")),
                                PREV_PROCESS_SEQ         = rdr.GetValue(rdr.GetOrdinal("PREV_PROCESS_SEQ")),
                                NEXT_PROCESS_SEQ         = rdr.GetValue(rdr.GetOrdinal("NEXT_PROCESS_SEQ")),
                                PURCHASE_ORDER_NO        = rdr.GetValue(rdr.GetOrdinal("PURCHASE_ORDER_NO")),
                                ORDER_DATE               = rdr.GetValue(rdr.GetOrdinal("ORDER_DATE")),
                                EST_END_DATE             = rdr.GetValue(rdr.GetOrdinal("EST_END_DATE")),
                                DUE_DATE                 = rdr.GetValue(rdr.GetOrdinal("DUE_DATE")),
                                ITEM_SPEC                = rdr.GetValue(rdr.GetOrdinal("ITEM_SPEC")),
                                PART_NUMBER              = rdr.GetValue(rdr.GetOrdinal("PART_NUMBER")),
                                UNIT_WEIGHT              = rdr.GetValue(rdr.GetOrdinal("UNIT_WEIGHT")),
                                MOLD_NUMBER              = rdr.GetValue(rdr.GetOrdinal("MOLD_NUMBER")),
                                ORDER_IDX                = rdr.GetValue(rdr.GetOrdinal("ORDER_IDX")),
                            };
                            resultList.Add(vo);
                        }
                    }
                    conn.Close();
                }
            }
            catch (Exception exception)
            {
                MessageBox.Show(exception.Message);
            }
            return(resultList);
        }