private int RemoveOneRecord(int id)
    {
        int i      = -1;
        int userId = CurrentEnvironment.LoggedUser.Id;

        VaccinationEvent o = VaccinationEvent.GetVaccinationEventById(id);

        VaccinationLogic vl = new VaccinationLogic();

        o = vl.RemoveVaccinationEvent(o, userId);

        if (o != null)
        {
            UpdateVaccinationAppointment(o.AppointmentId, false);
            i = 1;
        }
        return(i);
    }
    private int UpdateOneRecord(int id, int vaccineLotId, string vaccinationDate, bool done, int nonvaccinationReason)
    {
        int i = -1;

        int      hfId   = CurrentEnvironment.LoggedUser.HealthFacilityId;
        int      userId = CurrentEnvironment.LoggedUser.Id;
        DateTime date   = DateTime.ParseExact(vaccinationDate, ConfigurationDate.GetConfigurationDateById(int.Parse(Configuration.GetConfigurationByName("DateFormat").Value)).DateFormat.ToString(), CultureInfo.CurrentCulture);

        if (ddlHealthFacility.SelectedIndex != 0)
        {
            hfId = int.Parse(ddlHealthFacility.SelectedValue);
        }

        VaccinationLogic vl = new VaccinationLogic();
        VaccinationEvent ve = vl.UpdateVaccinationEvent(id, vaccineLotId, date, hfId, done, nonvaccinationReason, userId, DateTime.Now);

        if (ve != null)
        {
            UpdateVaccinationAppointment(ve.AppointmentId, chbxOutreach.Checked);
            UpdateSupplements(ve.ChildId);
            i = 1;
        }
        return(i);
    }