public bool AddPreliminary(Preliminary org)
 {
     try
     {
         entities.Preliminaries.Add(org);
         entities.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
 public bool DeletePreliminary(int mCustID)
 {
     try
     {
         Preliminary data = entities.Preliminaries.Where(m => m.PreliminaryID == mCustID).FirstOrDefault();
         entities.Preliminaries.Remove(data);
         entities.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
        public bool UpdatePreliminary(Preliminary org)
        {
            try
            {
                Preliminary data = entities.Preliminaries.Where(m => m.PreliminaryID == org.PreliminaryID).FirstOrDefault();

                data.ActivityID             = org.ActivityID;
                data.NomorPreliminarySurvey = org.NomorPreliminarySurvey;
                data.Date_Start             = org.Date_Start;
                data.Date_End   = org.Date_End;
                data.Type       = org.Type;
                data.EmployeeID = org.EmployeeID;

                entities.SaveChanges();
                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }