Exemple #1
0
 public void updatsdata()
 {
     try
     {
         int refids = int.Parse(refferids.Text);
         rf                    = hn.Reffers.Where(p => p.RefferId == refids).First();
         rf.PatientID          = int.Parse(paitentid.Text);
         rf.PatientName        = name.Text;
         rf.FatherName         = fathername.Text;
         rf.Sex                = sex.Text;
         rf.Age                = int.Parse(Age.Text);
         rf.Date               = DateTime.Parse(dates.Text);
         rf.PhysicianName      = physicianname.Text;
         rf.PaitientCase       = paitentcase.Text;
         rf.TreatmentStartFrom = DateTime.Parse(treatmentstartfrm.Text);
         rf.DetailInformation  = Detailinformation.Text;
         rf.RefferTo           = referto.Text;
         hn.SaveChanges();
         clear();
     }
     catch (Exception qw)
     {
         MessageBox.Show(qw.Message.ToString());
         clear();
     }
 }
Exemple #2
0
 public void savedataa()
 {
     try
     {
         rf                    = hn.Reffers.Create();
         rf.PatientID          = int.Parse(paitentid.Text);
         rf.PatientName        = name.Text;
         rf.FatherName         = fathername.Text;
         rf.Sex                = sex.Text;
         rf.Age                = int.Parse(Age.Text);
         rf.Date               = DateTime.Parse(dates.Text);
         rf.PhysicianName      = physicianname.Text;
         rf.PaitientCase       = paitentcase.Text;
         rf.TreatmentStartFrom = DateTime.Parse(treatmentstartfrm.Text);
         rf.DetailInformation  = Detailinformation.Text;
         rf.RefferTo           = referto.Text;
         hn.Reffers.Add(rf);
         hn.SaveChanges();
         clear();
     }
     catch (Exception ser)
     {
         MessageBox.Show(ser.Message.ToString());
         clear();
     }
 }
Exemple #3
0
 public void removddata()
 {
     try
     {
         int refids = int.Parse(refferids.Text);
         rf = hn.Reffers.Where(p => p.RefferId == refids).First();
         hn.Reffers.Remove(rf);
         hn.SaveChanges();
         clear();
     }
     catch (Exception ju)
     {
         MessageBox.Show(ju.Message.ToString());
         clear();
     }
 }