示例#1
0
 public void UpdateDestination(tbl_Destination tblDestination)
 {
     try
     {
         IGenericDataRepository <tbl_Destination> repository = new GenericDataRepository <tbl_Destination>();
         repository.Update(tblDestination);
     }
     catch (Exception)
     {
         throw;
     }
 }
示例#2
0
        public tbl_Destination FindDestinationDesc(string destDesc, int daid)
        {
            try
            {
                IGenericDataRepository <tbl_Destination> repository = new GenericDataRepository <tbl_Destination>();
                tbl_Destination tblDestination = repository.GetSingle(d => d.DestDesc.ToUpper() == destDesc.ToUpper() && d.daId == daid);

                return(tblDestination);
            }
            catch (Exception)
            {
                throw;
            }
        }
示例#3
0
        public tbl_Destination FindDestination(int?destID)
        {
            try
            {
                IGenericDataRepository <tbl_Destination> repository = new GenericDataRepository <tbl_Destination>();
                tbl_Destination tblDestination = repository.GetSingle(d => d.DestID == destID);

                return(tblDestination);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void DeleteDestination(DestinationViewModel destViewModel)
        {
            try
            {
                tbl_Destination tblDestination = new tbl_Destination();
                tblDestination.daId        = destViewModel.DAID;
                tblDestination.DestID      = destViewModel.destID;
                tblDestination.EntityState = DA.DomainModel.EntityState.Deleted;

                DestinationManager destManager = new DestinationManager();
                destManager.DeleteDestination(tblDestination);
            }
            catch (Exception)
            {
                throw;
            }
        }