示例#1
0
        /// <summary>
        /// 獲取BIP Panel未分板數量
        /// </summary>
        /// <param name="PanelSn"></param>
        /// <param name="DB"></param>
        /// <param name="DBType"></param>
        /// <returns></returns>
        public int PanelNoBIPQty(string PanelSn, OleExec DB, DB_TYPE_ENUM DBType)
        {
            int    NoBIPQty = 0;
            string errMsg   = string.Empty;

            if (DBType.Equals(DB_TYPE_ENUM.Oracle))
            {
                string strsql = $@"select count(1) from r_sn where sn in (
                        select sn from r_panel_sn where panel = '{PanelSn}' ) 
                        and id = sn";
                NoBIPQty = int.Parse(DB.ExecSelectOneValue(strsql).ToString());
            }
            else
            {
                errMsg = MESReturnMessage.GetMESReturnMessage("MES00000019", new string[] { DBType.ToString() });
                throw new MESReturnMessage(errMsg);
            }
            return(NoBIPQty);
        }
示例#2
0
        public int SetPanelInValid(string PanelNo, OleExec DB, DB_TYPE_ENUM DBType)
        {
            string strSql = string.Empty;
            int    result = 0;
            string errMsg = string.Empty;

            if (DBType.Equals(DB_TYPE_ENUM.Oracle))
            {
                strSql = $@"UPDATE R_SN SET VALID_FLAG='0',CURRENT_STATION='UNDO_LOADING' WHERE ID IN 
                        (SELECT SN FROM R_PANEL_SN WHERE PANEL='{PanelNo}')";
                result = DB.ExecSqlNoReturn(strSql, null);
            }
            else
            {
                errMsg = MESReturnMessage.GetMESReturnMessage("MES00000019", new string[] { DBType.ToString() });
                throw new MESReturnMessage(errMsg);
            }

            return(result);
        }