public bool UpdateLetterOfCommand(LetterOfCommand org)
        {
            try
            {
                LetterOfCommand data = entities.LetterOfCommands.Where(m => m.LetterOfCommandID == org.LetterOfCommandID).FirstOrDefault();

                data.NomorSP       = org.NomorSP;
                data.ActivityID    = org.ActivityID;
                data.Status        = org.Status;
                data.Remarks       = org.Remarks;
                data.AssuranceType = org.AssuranceType;
                data.Date_Start    = org.Date_Start;
                data.Date_End      = org.Date_End;
                data.Menimbang     = org.Menimbang;
                data.Penutup       = org.Penutup;
                data.PreliminaryID = org.PreliminaryID;
                data.PICID         = org.PICID;
                data.ActivityID    = org.ActivityID;
                data.PICID         = org.PICID;
                data.SupervisorID  = org.SupervisorID;
                data.TeamLeaderID  = org.TeamLeaderID;
                data.MemberID      = org.MemberID;


                entities.SaveChanges();
                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
 public bool AddLetterOfCommand(LetterOfCommand org)
 {
     try
     {
         entities.LetterOfCommands.Add(org);
         entities.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
 public bool DeleteLetterOfCommand(int mCustID)
 {
     try
     {
         LetterOfCommand data = entities.LetterOfCommands.Where(m => m.LetterOfCommandID == mCustID).FirstOrDefault();
         entities.LetterOfCommands.Remove(data);
         entities.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }