public R_Station CreatecstationactionClass(DataRow dr) { Row_R_Station row = (Row_R_Station)NewRow(); row.loadData(dr); return(row.GetDataObject()); }
public Row_R_Station GetRowByDisplayName(string DisplayName, OleExec DB) { string strsql = ""; if (DBType == DB_TYPE_ENUM.Oracle) { strsql = $@"select ID from {TableName} where Display_Station_Name = '{DisplayName.Replace("'", "''")}'"; string ID = DB.ExecSelectOneValue(strsql)?.ToString(); if (ID == null) { string errMsg = MESReturnMessage.GetMESReturnMessage("MES00000007", new string[] { "Station" + DisplayName }); throw new MESReturnMessage(errMsg); } Row_R_Station R = (Row_R_Station)this.GetObjByID(ID, DB); return(R); } else { string errMsg = MESReturnMessage.GetMESReturnMessage("MES00000019", new string[] { DBType.ToString() }); throw new MESReturnMessage(errMsg); } }