Esempio n. 1
0
 public void remoeddata()
 {
     try
     {
         int idsds = int.Parse(operationis.Text);
         hy = gt.OperationRequsts.Where(p => p.operationID == idsds).First();
         gt.OperationRequsts.Remove(hy);
         gt.SaveChanges();
         clear();
     }
     catch (Exception wer)
     {
         MessageBox.Show(wer.Message.ToString());
     }
 }
Esempio n. 2
0
 public void updatss()
 {
     try
     {
         int idsds = int.Parse(operationis.Text);
         hy                   = gt.OperationRequsts.Where(p => p.operationID == idsds).First();
         hy.PatientID         = int.Parse(paitentid.Text);
         hy.PatientName       = name.Text;
         hy.FatherName        = fathername.Text;
         hy.Sex               = sex.Text;
         hy.Age               = int.Parse(Age.Text);
         hy.Date              = dates.Text;
         hy.PhysicianName     = physicianname.Text;
         hy.OperatienDate     = operationdate.Text;
         hy.AssignedPhysician = assignphysician.Text;
         hy.Specification     = specification.Text;
         gt.SaveChanges();
         clear();
     }
     catch (Exception v3)
     {
         MessageBox.Show(v3.Message.ToString());
     }
 }
Esempio n. 3
0
 public void savedata()
 {
     try
     {
         hy                   = gt.OperationRequsts.Create();
         hy.PatientID         = int.Parse(paitentid.Text);
         hy.PatientName       = name.Text;
         hy.FatherName        = fathername.Text;
         hy.Sex               = sex.Text;
         hy.Age               = int.Parse(Age.Text);
         hy.Date              = dates.Text;
         hy.PhysicianName     = physicianname.Text;
         hy.OperatienDate     = operationdate.Text;
         hy.AssignedPhysician = assignphysician.Text;
         hy.Specification     = specification.Text;
         gt.OperationRequsts.Add(hy);
         gt.SaveChanges();
         clear();
     }
     catch (Exception se)
     {
         MessageBox.Show(se.Message.ToString());
     }
 }