コード例 #1
0
 public void Update(NotesTblInfo note)
 {
     if (note.NoteID > 0)
     {
         string sql = "UPDATE [dbo].[notesTbl]"
                      + " SET [noteName] = N'" + note.NoteName + "'"
                      + ",[clinicName] = N'" + note.ClinicName + "'"
                      + ",[clinicAddress] = N'" + note.ClinicAddress + "'"
                      + ",[doctorName] = N'" + note.DoctorName + "'"
                      + ",[doctorPhone] = '" + note.DoctorPhone + "'"
                      + ",[patientName] = N'" + note.PatientName + "'"
                      + ",[patientAge] = " + note.PatientAge
                      + ",[patientGender] = " + note.PatientGender
                      + ",[patientCode] = N'" + note.PatientCode + "'"
                      + ",[patientPhone] = '" + note.PatientPhone + "'"
                      + ",[patientAddress] = N'" + note.PatientAddress + "'"
                      + ",[reason] = N'" + note.Reason + "'"
                      + ",[suggest] = N'" + note.Suggest + "'"
                      + ",[imagePath1] = N'" + note.ImagePath1 + "'"
                      + ",[imagePath2] = N'" + note.ImagePath2 + "'"
                      + ",[templateID] = " + note.TemplateID
                      + ",[dayCreate] = '" + Convert.ToDateTime(note.DayCreate) + "'"
                      + " WHERE noteID = " + note.NoteID;
         SqlExtend.ExecuteNonQuery(Data.ConnectionString, CommandType.Text, sql);
     }
 }
コード例 #2
0
 // Delete
 public void Delete(TemplateTblInfo template)
 {
     if (template.TemplateID > 0)
     {
         string sql = "DELETE FROM [dbo].[templateTbl]"
                      + " WHERE templateID = " + template.TemplateID;
         SqlExtend.ExecuteNonQuery(Data.ConnectionString, CommandType.Text, sql);
     }
 }
コード例 #3
0
 // Delete
 public void Delete(NotesTblInfo note)
 {
     if (note.NoteID > 0)
     {
         string sql = "DELETE FROM [dbo].[notesTbl]"
                      + " WHERE noteID = " + note.NoteID;
         SqlExtend.ExecuteNonQuery(Data.ConnectionString, CommandType.Text, sql);
     }
 }
コード例 #4
0
 public void Update(TemplateTblInfo template)
 {
     if (template.TemplateID > 0)
     {
         string sql = "UPDATE [dbo].[templateTbl]"
                      + " SET[templateName] = N'" + template.TemplateName + "'"
                      + ",[resultDetail] = N'" + template.ResultDetail + "'"
                      + ",[diagnosis] = N'" + template.Diagnosis + "'"
                      + ",[analysis] = N'" + template.Analysis + "'"
                      + " WHERE templateID = " + template.TemplateID;
         SqlExtend.ExecuteNonQuery(Data.ConnectionString, CommandType.Text, sql);
     }
 }
コード例 #5
0
        public void Add(TemplateTblInfo template)
        {
            string sql = "INSERT INTO [dbo].[templateTbl]"
                         + "([templateName]"
                         + ",[resultDetail]"
                         + ",[diagnosis]"
                         + ",[analysis])"
                         + " VALUES "
                         + "(N'" + template.TemplateName + "'"
                         + ",N'" + template.ResultDetail + "'"
                         + ",N'" + template.Diagnosis + "'"
                         + ",N'" + template.Analysis + "'" + ")";

            SqlExtend.ExecuteNonQuery(Data.ConnectionString, CommandType.Text, sql);
        }
コード例 #6
0
        public void Add(NotesTblInfo note)
        {
            string sql = "INSERT INTO [dbo].[notesTbl]"
                         + "([noteName]"
                         + ",[clinicName]"
                         + ",[clinicAddress]"
                         + ",[doctorName]"
                         + ",[doctorPhone]"
                         + ",[patientName]"
                         + ",[patientAge]"
                         + ",[patientGender]"
                         + ",[patientCode]"
                         + ",[patientPhone]"
                         + ",[patientAddress]"
                         + ",[reason]"
                         + ",[suggest]"
                         + ",[imagePath1]"
                         + ",[imagePath2]"
                         + ",[templateID]"
                         + ",[dayCreate])"
                         + " VALUES "
                         + "(N'" + note.NoteName + "'"
                         + ",N'" + note.ClinicName + "'"
                         + ",N'" + note.ClinicAddress + "'"
                         + ",N'" + note.DoctorName + "'"
                         + ",'" + note.DoctorPhone + "'"
                         + ",N'" + note.PatientName + "'"
                         + "," + note.PatientAge
                         + "," + note.PatientGender
                         + ",N'" + note.PatientCode + "'"
                         + ",'" + note.PatientPhone + "'"
                         + ",N'" + note.PatientAddress + "'"
                         + ",N'" + note.Reason + "'"
                         + ",N'" + note.Suggest + "'"
                         + ",N'" + note.ImagePath1 + "'"
                         + ",N'" + note.ImagePath2 + "'"
                         + "," + note.TemplateID
                         + ",'" + Convert.ToDateTime(note.DayCreate) + "')";

            SqlExtend.ExecuteNonQuery(Data.ConnectionString, CommandType.Text, sql);
        }