public IList <BasSequence> FindSquenceByCode(string squence) { string sql = "SELECT * FROM MES_MASTER.BAS_SEQUENCE "; if (!string.IsNullOrEmpty(squence)) { sql = sql + " WHERE SEQ_NAME= '" + squence + "' "; } return(DBContext.ExcuteSql(sql).ToBusiObjects <BasSequence>()); }
public IList <BasCustom> FindCust(string startTime, string endTime, string custCode) { string sql = "SELECT * FROM MES_MASTER.BAS_CUSTOM WHERE 1=1 "; if (!string.IsNullOrEmpty(startTime)) { sql = sql + " AND CREATED_DATE>= to_date('" + startTime + "','yyyy-mm-dd hh24:mi:ss') "; } if (!string.IsNullOrEmpty(endTime)) { sql = sql + " AND CREATED_DATE>= to_date('" + endTime + "','yyyy-mm-dd hh24:mi:ss') "; } if (!string.IsNullOrEmpty(custCode)) { sql = sql + " AND CODE= '" + custCode + "' "; } return(DBContext.ExcuteSql(sql).ToBusiObjects <BasCustom>()); }