public bool Remove(int id)
        {
            physician_holiday_rate del = _unitOfWork.PhysicianHolidayRateRepository.Query().Where(m => m.phr_uss_key == id).FirstOrDefault();

            _unitOfWork.PhysicianHolidayRateRepository.DeleteRate(del);
            _unitOfWork.Save();
            _unitOfWork.Commit();
            return(true);
        }
        private bool insert(ScheduleRecordViewModel _UserSchedule, string user_key, string user_name, long uss_key)
        {
            physician_holiday_rate _holidayRate = new physician_holiday_rate();

            _holidayRate.phr_phy_key         = _UserSchedule.UserId;
            _holidayRate.phr_rate            = _UserSchedule.Rate;
            _holidayRate.phr_created_by      = user_key;
            _holidayRate.phr_created_by_name = user_name;
            _holidayRate.phr_date            = _UserSchedule.ScheduleDate.Date;
            _holidayRate.phr_created_date    = DateTime.Now.ToEST();
            _holidayRate.phr_uss_key         = uss_key;
            _holidayRate.phr_shift_key       = _UserSchedule.ShiftId;
            _physicianHolidayRateService.Create(_holidayRate);
            return(true);
        }
 public void Create(physician_holiday_rate entity)
 {
     _unitOfWork.PhysicianHolidayRateRepository.Insert(entity);
     _unitOfWork.Save();
     _unitOfWork.Commit();
 }
 public void Edit(physician_holiday_rate entity)
 {
     _unitOfWork.PhysicianHolidayRateRepository.Update(entity);
     _unitOfWork.Save();
     _unitOfWork.Commit();
 }
 private bool update(ScheduleRecordViewModel _UserSchedule, string user_key, string user_name, physician_holiday_rate obj, long uss_key)
 {
     obj.phr_phy_key          = _UserSchedule.UserId;
     obj.phr_rate             = _UserSchedule.Rate;
     obj.phr_modified_by      = user_key;
     obj.phr_shift_key        = _UserSchedule.ShiftId;
     obj.phr_modified_by_name = user_name;
     obj.phr_date             = _UserSchedule.ScheduleDate.Date;
     obj.phr_modified_date    = DateTime.Now.ToEST();
     _physicianHolidayRateService.Edit(obj);
     return(true);
 }