示例#1
0
 private bool Add_patient()
 {
     // throw new System.NotImplementedException();
     if (textBox_name.ToString() == null)
     {
         Console.WriteLine("No name");
         return(false);
     }
     else
     {
         DBFactory.ExcuteNonQuery(
             @"INSERT INTO "
             + @" TB_PATIENT (IDX,PAT_NUM,PAT_NAME,PAT_AGE,PAT_SEX,PAT_FEATURE)"
             + @"VALUES"
             + @"('" + Session.curSession.id + "','"
             + (new Random()).Next(1000000000) + "','"
             + utfEncoding.ToUtf8(textBox_name.Text) + "','"
             + int.Parse(textBox_age.Text) + "','"
             + utfEncoding.ToUtf8(this.selectedSex) + "','"
             + utfEncoding.ToUtf8(textbox_feat.Text) + "')"
             );
         return(true);
     }
 }
示例#2
0
 private void button2_Click(object sender, EventArgs e)
 {
     DBFactory.ExcuteNonQuery("INSERT INTO TB_CURER VALUES (1, 'test', 'test')");
 }