public DataTable GetNotes() { string sql = "SELECT [noteID]" + ",[noteName]" + ",[clinicName]" + ",[clinicAddress]" + ",[doctorName]" + ",[doctorPhone]" + ",[patientName]" + ",[patientAge]" + ",[patientGender]" + ",[patientCode]" + ",[patientPhone]" + ",[patientAddress]" + ",[reason]" + ",[suggest]" + ",[imagePath1]" + ",[imagePath2]" + ",[templateID]" + ",[dayCreate]" + " FROM [dbo].[notesTbl]" + " WHERE 1=1"; sql += " ORDER BY noteID ASC"; return(SqlExtend.ExecuteDataTable(Data.ConnectionString, CommandType.Text, sql)); }
public DataTable GetSearchedNotes(NotesTblInfo note) { string sql = "SELECT [noteID]" + ",[noteName]" + ",[clinicName]" + ",[clinicAddress]" + ",[doctorName]" + ",[doctorPhone]" + ",[patientName]" + ",[patientAge]" + ",[patientGender]" + ",[patientCode]" + ",[patientPhone]" + ",[patientAddress]" + ",[reason]" + ",[suggest]" + ",[imagePath1]" + ",[imagePath2]" + ",[templateID]" + ",[dayCreate]" + " FROM [dbo].[notesTbl]" + " WHERE 1=1"; if (note.NoteID > 0) { sql += " AND noteID like %" + note.NoteID + "%"; } if (note.NoteName.Length > 0) { sql += " AND noteName like %'" + note.NoteName + "'%"; } if (note.ClinicName.Length > 0) { sql += " AND clinicName like %'" + note.ClinicName + "'%"; } if (note.DoctorName.Length > 0) { sql += " AND doctorName like %'" + note.DoctorName + "'%"; } if (note.PatientName.Length > 0) { sql += " AND patientName like %'" + note.PatientName + "'%"; } if (note.PatientCode.Length > 0) { sql += " AND patientCode like %'" + note.PatientCode + "'%"; } if (note.DayCreate.Length > 0) { sql += " AND dayCreate like %" + Convert.ToDateTime(note.DayCreate) + "%"; } sql += " ORDER BY noteID ASC"; return(SqlExtend.ExecuteDataTable(Data.ConnectionString, CommandType.Text, sql)); }
public DataTable GetTemplates(TemplateTblInfo template) { string sql = "SELECT [templateID]" + ",[templateName]" + ",[resultDetail]" + ",[diagnosis]" + ",[analysis]" + " FROM [dbo].[templateTbl]" + " WHERE 1=1"; if (template.TemplateID > 0) { sql += " AND templateID = " + template.TemplateID; } sql += " ORDER BY templateID ASC"; return(SqlExtend.ExecuteDataTable(Data.ConnectionString, CommandType.Text, sql)); }
//search notes public DataTable SearchNotes(string sql) { return(SqlExtend.ExecuteDataTable(Data.ConnectionString, CommandType.Text, sql)); }
public DataTable GetDataTable(string Sql) { return(SqlExtend.ExecuteDataTable(Data.ConnectionString, CommandType.Text, Sql)); }