private void button1_Click(object sender, EventArgs e)
 {
     pser = ser.Find(Convert.ToInt32(pno.Text));
     if (pser.patientName == "error")
     {
         MessageBox.Show("Couldn't connect to any database at the moment","LIFECARE");
     }
     else
     {
         report_LCH rp = new report_LCH();
         rp.Show();
     }
 }
        private void button1_Click(object sender, EventArgs e)
        {
            CEFCServiceReference.Class_Patient p = new CEFCServiceReference.Class_Patient();
            p.patientNo = Convert.ToInt32(pno.Text);
            p.patientName = pname.Text;
            p.Page = Convert.ToInt32(page.Text);
            if (radioButton1.Checked == true)
            {
                p.Psex = radioButton1.Text;
            }
            else
            {
                p.Psex = radioButton2.Text;

            }
            p.Paddress = paddr.Text;
            p.PdisDate = Convert.ToDateTime(dateTimePicker1.Text).Date;//ToString("dd/MM/yyyy");
            p.PempID = Convert.ToInt32(pempid.Text);
            p.Premarks = premarks.Text;
            p.PregDate = Convert.ToDateTime(dateTimePicker2.Text).Date;

            MessageBox.Show(obj.InsertNewPatients(p));
        }
        private void button3_Click(object sender, EventArgs e)
        {
            CEFCServiceReference.Class_Patient p = new CEFCServiceReference.Class_Patient();
               pno.Text= Microsoft.VisualBasic.Interaction.InputBox("Enter patient ID", "LIFECARE");
               p=obj.Find(Convert.ToInt32(pno.Text));
               pname.Text = p.patientName;
               pno.Text = Convert.ToString(p.patientNo);
               page.Text = Convert.ToString(p.Page);
               dateTimePicker1.Text = Convert.ToString(p.PdisDate);
               dateTimePicker2.Text = Convert.ToString(p.PregDate);
               pempid.Text = Convert.ToString(p.PempID);
               paddr.Text = p.Paddress;
               premarks.Text = p.Premarks;

               if (p.Psex == "Male")
               {
               radioButton1.Checked = true;

               }
               else
               {
               radioButton2.Checked = true;
               }
        }