public static bool DeletePatientsEnrollments(string PatientId)
    {
        try
        {
            var _PatientEnrollMent = new PatientEnrollMent();
            _PatientEnrollMent.PatientId = PatientId;

            if (_PatientEnrollMent.DeletePatientEnrollMent())
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        catch (Exception ex)
        {
            Security secs = new Security();
            secs.ErrorDesscription = ex.Message;
            //secs.Terminus = HttpContext.Current.Request.Cookies["TerminusCookie"].Value;
            secs.ErrorModule = "Initializing Deleting PatientEnrollMent";
            secs.SaveError();
            return(false);
        }
    }
    public void LoadPatientsEnrollments()
    {
        try
        {
            var ds = new DataSet();

            var _PatientEnrollMent = new PatientEnrollMent();
            ds = _PatientEnrollMent.SelectAllPatientEnrollments();
            GvPatientEnrollMent.DataSource = ds.Tables["PatientEnrollMent"];
            GvPatientEnrollMent.DataBind();
        }
        catch (Exception ex)
        {
            Security secs = new Security();
            secs.ErrorDesscription = ex.Message;
            // secs.Terminus = HttpContext.Current.Request.Cookies["TerminusCookie"].Value;
            secs.ErrorModule = "Initializing Selecting All PatientEnrollMent";
            secs.SaveError();
        }
    }
    protected void cpPatientEnrollMent_Callback(object sender, CallbackEventArgsBase e)
    {
        try
        {
            DataSet ds = new DataSet();
            var     _PatientEnrollMent = new PatientEnrollMent();
            _PatientEnrollMent.PatientId = Session["PatientId"].ToString();
            ds = _PatientEnrollMent.SelectPatientEnrollMent();
            DisableField();

            glPatientId.Value      = ds.Tables["PatientEnrollMent"].Rows[0]["PatientId"].ToString();
            txtEnrollmentNo.Text   = ds.Tables["PatientEnrollMent"].Rows[0]["EnrollmentNo"].ToString();
            dtpEnrollmentDate.Date = Convert.ToDateTime(ds.Tables["PatientEnrollMent"].Rows[0]["EnrollmentDate"]);
        }
        catch (Exception ex)
        {
            var ErrorDesscription = ex.Message;

            //_Security.ErrorDesscription = ex.Message;
            //_Security.ErrorModule = "performing callback on form SubLedger";
            //_Security.SaveError();
        }
    }