示例#1
0
        public void removess()
        {
            try
            {
                int ides = Convert.ToInt32(roomid.Text);
                bd = bn.bedwards.Where(p => p.BedwID == ides).First();
                bn.bedwards.Remove(bd);
                bn.SaveChanges();

                clear();
            }
            catch (Exception vg)
            {
                MessageBox.Show(vg.Message.ToString());
            }
        }
示例#2
0
 public void updatss()
 {
     try
     {
         int ides = Convert.ToInt32(roomid.Text);
         bd             = bn.bedwards.Where(p => p.BedwID == ides).First();
         bd.PatientID   = int.Parse(paitentid.Text);
         bd.PatientName = name.Text;
         bd.FatherName  = fathername.Text;
         bd.Age         = int.Parse(Age.Text);
         bd.Sex         = sex.Text;
         bd.Date        = DateTime.Parse(dates.Text);
         bd.Physician   = physicianname.Text;
         bd.AssignFor   = DateTime.Parse(assignedfor.Text);
         bd.RoomStatus  = roomstatus.Text;
         bn.SaveChanges();
         clear();
     }
     catch (Exception tr)
     {
         MessageBox.Show(tr.Message.ToString());
     }
 }
示例#3
0
 public void savefiles()
 {
     try
     {
         bd             = bn.bedwards.Create();
         bd.PatientID   = int.Parse(paitentid.Text);
         bd.PatientName = name.Text;
         bd.FatherName  = fathername.Text;
         bd.Age         = int.Parse(Age.Text);
         bd.Sex         = sex.Text;
         bd.Date        = DateTime.Parse(dates.Text);
         bd.Physician   = physicianname.Text;
         bd.AssignFor   = DateTime.Parse(assignedfor.Text);
         bd.RoomStatus  = roomstatus.Text;
         bn.bedwards.Add(bd);
         bn.SaveChanges();
         clear();
     }
     catch (Exception gt)
     {
         MessageBox.Show(gt.Message.ToString());
     }
 }