Ejemplo n.º 1
0
 public static bool AddExistingBudgetATC(ExistingStaffBudgetATC astBud)
 {
     try
     {
         using (BudgetCaptureDBEntities db = new BudgetCaptureDBEntities())
         {
             db.ExistingStaffBudgetATCs.Add(astBud);
             db.SaveChanges();
             return(true);
         }
     }
     catch (Exception ex)
     {
         // Utility.WriteError("Error Msg: " + ex.Message);
         throw ex;
     }
 }
Ejemplo n.º 2
0
 public static bool UpdateExistingStaffBudgetATC(ExistingStaffBudgetATC astBud)
 {
     try
     {
         bool rst = false;
         using (var db = new BudgetCaptureDBEntities())
         {
             db.ExistingStaffBudgetATCs.Attach(astBud);
             db.Entry(astBud).State = System.Data.Entity.EntityState.Modified;
             db.SaveChanges();
             rst = true;
         }
         return(rst);
     }
     catch (Exception ex)
     {
         // Utility.WriteError("Error Msg: " + ex.Message);
         throw ex;
     }
 }