public NoteListDto ListNoteForInvoice(string sessionKey, string invoiceId) { NoteListDto retVal = new NoteListDto(); retVal.Add(GetNote(sessionKey, "1")); retVal.Add(GetNote(sessionKey, "2")); return(retVal); }
public List <NoteListDto> GetByprogrammingIDByschoolIDByactive(Int32 programmingID, Int32 schoolID, Boolean active) { SqlConnection conn = null; SqlDataReader reader; String sql; SqlCommand command; SqlParameter prmprogrammingID = null; SqlParameter prmschoolID = null; SqlParameter prmactive = null; try { NoteListDto note; List <NoteListDto> lstNotes; conn = new SqlConnection(Functions.GetConnectionString()); sql = "GetNoteByprogrammingIDByschoolIDByactive"; command = new SqlCommand(sql, conn); command.CommandType = CommandType.StoredProcedure; prmprogrammingID = new SqlParameter(); prmprogrammingID.ParameterName = "@programmingID"; prmprogrammingID.SqlDbType = SqlDbType.Int; prmprogrammingID.Value = programmingID; command.Parameters.Add(prmprogrammingID); prmschoolID = new SqlParameter(); prmschoolID.ParameterName = "@schoolID"; prmschoolID.SqlDbType = SqlDbType.Int; prmschoolID.Value = schoolID; command.Parameters.Add(prmschoolID); prmactive = new SqlParameter(); prmactive.ParameterName = "@active"; prmactive.SqlDbType = SqlDbType.Bit; prmactive.Value = active; command.Parameters.Add(prmactive); command.Connection.Open(); reader = command.ExecuteReader(); lstNotes = new List <NoteListDto>(); while (reader.Read()) { note = new NoteListDto(); note.noteID = reader.GetInt32(reader.GetOrdinal("noteID")); if (reader.GetDecimal(reader.GetOrdinal("note")) == 100) { note.note = ""; } else { note.note = reader.GetDecimal(reader.GetOrdinal("note")).ToString(); } note.studentID = reader.GetInt32(reader.GetOrdinal("studentID")); note.evaluationID = reader.GetInt32(reader.GetOrdinal("evaluationID")); lstNotes.Add(note); } command.Connection.Close(); conn.Dispose(); return(lstNotes); } catch (Exception ex) { conn.Dispose(); throw ex; } }
public NoteListDto ListNoteForInvoice(string sessionKey, string invoiceId) { NoteListDto retVal = new NoteListDto(); retVal.Add(GetNote(sessionKey, "1")); retVal.Add(GetNote(sessionKey, "2")); return retVal; }