Beispiel #1
0
 public bool AddFieldWork(FieldWork org)
 {
     try
     {
         entities.FieldWorks.Add(org);
         entities.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Beispiel #2
0
 public bool DeleteFieldWork(int mCustID)
 {
     try
     {
         FieldWork data = entities.FieldWorks.Where(m => m.FieldWorkID == mCustID).FirstOrDefault();
         entities.FieldWorks.Remove(data);
         entities.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Beispiel #3
0
        public bool UpdateFieldWork(FieldWork org)
        {
            try
            {
                FieldWork data = entities.FieldWorks.Where(m => m.FieldWorkID == org.FieldWorkID).FirstOrDefault();

                data.RiskControlMatrixID = org.RiskControlMatrixID;
                data.LetterOfCommandID   = org.LetterOfCommandID;
                data.Status = org.Status;



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