Beispiel #1
0
        public R_PANEL_SN GetRow(DataRow DR)
        {
            Row_R_PANEL_SN Ret = (Row_R_PANEL_SN)NewRow();

            Ret.loadData(DR);
            return(Ret.GetDataObject());
        }
Beispiel #2
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);
        }