示例#1
0
 public bool AddVacationSupplier(VacationSuppliers T)
 {
     try
     {
         dc.VacationSuppliers.Add(T);
         dc.SaveChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
示例#2
0
 public bool EditVacationSupplier(VacationSuppliers T)
 {
     try
     {
         var data = dc.VacationSuppliers.Where(o => o.Id == T.Id).FirstOrDefault();
         data.SupplierId = T.SupplierId;
         data.VacationId = T.VacationId;
         dc.SaveChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
示例#3
0
 public IActionResult editVacationSuppliers([FromBody] VacationSuppliers T)
 {
     return(Ok(vacationSupplierRepository.EditVacationSupplier(T)));
 }