示例#1
0
 public static DAL.AmountPeopleInShelter DtoToDAL(AmountPeopleInShelterDTO amountPPLDTO)
 {
     DAL.AmountPeopleInShelter amountPPLDAL = new DAL.AmountPeopleInShelter();
     amountPPLDAL.AmountpplKey   = amountPPLDTO.AmountpplKey;
     amountPPLDAL.ShelterKey     = amountPPLDTO.ShelterKey;
     amountPPLDAL.AmountPPLSpeDH = amountPPLDTO.AmountPPLSpeDH;
     amountPPLDAL.Date           = amountPPLDTO.Date;
     amountPPLDAL.Time           = amountPPLDTO.Time;
     return(amountPPLDAL);
 }
示例#2
0
 public static bool UpdateAmountPPLInShelter(AmountPeopleInShelterDTO amountPPLDTO)
 {
     DAL.AmountPeopleInShelter amountPPLDAL = DtoToDAL(amountPPLDTO);
     try
     {
         db.AmountPeopleInShelters.Add(amountPPLDAL);
         db.SaveChanges();
         return(true);
     }
     catch (Exception e)
     {
         return(false);
     }
 }