Exemple #1
0
        public R_PANEL_SN GetPanelVirtualSN(string Panel, OleExec DB)
        {
            R_PANEL_SN Row    = null;
            string     StrSql = $@"SELECT B.* FROM R_SN A, R_PANEL_SN B WHERE B.PANEL='{ Panel }' AND A.ID=B.SN order by B.SEQ_NO";
            DataTable  Dt     = DB.ExecSelect(StrSql).Tables[0];

            if (Dt.Rows.Count > 0)
            {
                Row = GetRow(Dt.Rows[0]);
            }
            return(Row);
        }
Exemple #2
0
        public R_PANEL_SN GetDataObject()
        {
            R_PANEL_SN DataObject = new R_PANEL_SN();

            DataObject.ID          = this.ID;
            DataObject.SN          = this.SN;
            DataObject.PANEL       = this.PANEL;
            DataObject.WORKORDERNO = this.WORKORDERNO;
            DataObject.SEQ_NO      = this.SEQ_NO;
            DataObject.EDIT_EMP    = this.EDIT_EMP;
            DataObject.EDIT_TIME   = this.EDIT_TIME;
            return(DataObject);
        }
Exemple #3
0
        public R_PANEL_SN GetPanelBySn(string SerialNo, OleExec DB)
        {
            string         sql   = string.Empty;
            DataTable      dt    = new DataTable();
            Row_R_PANEL_SN row   = (Row_R_PANEL_SN)NewRow();
            R_PANEL_SN     Panel = null;

            if (this.DBType == DB_TYPE_ENUM.Oracle)
            {
                sql = $@"SELECT * FROM R_PANEL_SN WHERE SN='{SerialNo}'";
                dt  = DB.ExecSelect(sql).Tables[0];
                if (dt.Rows.Count > 0)
                {
                    row.loadData(dt.Rows[0]);
                    Panel = row.GetDataObject();
                }
            }
            else
            {
                string errMsg = MESReturnMessage.GetMESReturnMessage("MES00000019", new string[] { DBType.ToString() });
                throw new MESReturnMessage(errMsg);
            }
            return(Panel);
        }