예제 #1
0
        public int RemoveDichVu(int id)
        {
            DichVuPhongKham temp = db.dichvus.Where(x => x.idDV == id).FirstOrDefault();

            db.dichvus.Remove(temp);
            return(db.SaveChanges());
        }
예제 #2
0
        public void UpdateDichVu(eDichVuPhongKham dv)
        {
            DichVuPhongKham temp = db.dichvus.Where(x => x.idDV == dv.idDV).FirstOrDefault();

            temp.tenDV  = dv.tenDV;
            temp.donGia = dv.donGia;
            db.SaveChanges();
        }
예제 #3
0
        public eDichVuPhongKham getDVbyID(int id)
        {
            DichVuPhongKham  dv   = db.dichvus.Where(x => x.idDV == id).FirstOrDefault();
            eDichVuPhongKham temp = new eDichVuPhongKham();

            temp.idDV   = dv.idDV;
            temp.tenDV  = dv.tenDV;
            temp.donGia = dv.donGia;
            return(temp);
        }
예제 #4
0
        public int AddDichVu(eDichVuPhongKham dv)
        {
            DichVuPhongKham temp = new DichVuPhongKham();

            temp.idDV   = dv.idDV;
            temp.tenDV  = dv.tenDV;
            temp.donGia = dv.donGia;
            db.dichvus.Add(temp);
            return(db.SaveChanges());
        }