Beispiel #1
0
        public void Insert(string treat_type)
        {
            treatment tr = new treatment();

            tr.treat_type = treat_type;

            using (var Data = new HospitalEntities1())
            {
                Data.treatments.AddObject(tr);
                Data.SaveChanges();
            }
        }
Beispiel #2
0
        public void Insert(string equip_name, string requested_date, string date_defected)
        {
            equipment eq = new equipment();

            eq.equip_name     = equip_name;
            eq.requested_date = Convert.ToDateTime(requested_date);
            eq.date_defected  = Convert.ToDateTime(date_defected);


            using (var Data = new HospitalEntities1())
            {
                Data.equipments.AddObject(eq);
                Data.SaveChanges();
            }
        }
        public void Insert(string fname, string lname, string patient_type, int age, string addrs)
        {
            patient pt = new patient();

            pt.fname        = fname;
            pt.lname        = lname;
            pt.patient_type = patient_type;
            pt.age          = age;
            pt.addrs        = addrs;

            using (var Data = new HospitalEntities1())
            {
                Data.patients.AddObject(pt);
                Data.SaveChanges();
            }
        }
        public void Insert(string med_name, int quantity, int available_Qty, string exp_date, string requested_date)
        {
            medicine md = new medicine();

            md.med_name       = med_name;
            md.quantity       = quantity;
            md.available_Qty  = available_Qty;
            md.exp_date       = Convert.ToDateTime(exp_date);
            md.requested_date = Convert.ToDateTime(requested_date);


            using (var Data = new HospitalEntities1())
            {
                Data.medicines.AddObject(md);
                Data.SaveChanges();
            }
        }
Beispiel #5
0
        public void Insert(int patient_id, string complains, string findings, int treat_id, int med_id, int quantity, string check_date)
        {
            check_up ch = new check_up();

            ch.patient_id = patient_id;
            ch.complains  = complains;
            ch.findings   = findings;
            ch.treat_id   = treat_id;
            ch.med_id     = med_id;
            ch.quantity   = quantity;
            ch.check_date = Convert.ToDateTime(check_date);


            using (var Data = new HospitalEntities1())
            {
                Data.check_up.AddObject(ch);
                Data.SaveChanges();
            }
        }