示例#1
0
        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));
        }
示例#2
0
        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));
        }
示例#3
0
        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));
        }
示例#4
0
 //search notes
 public DataTable SearchNotes(string sql)
 {
     return(SqlExtend.ExecuteDataTable(Data.ConnectionString, CommandType.Text, sql));
 }
示例#5
0
 public DataTable GetDataTable(string Sql)
 {
     return(SqlExtend.ExecuteDataTable(Data.ConnectionString, CommandType.Text, Sql));
 }