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;
            }
        }
        public bool CheckDuplicate(DestinationViewModel destViewModel)
        {
            try
            {
                DestinationManager destmanager = new DestinationManager();

                var destination = destmanager.FindDestinationDesc(destViewModel.destDesc, destViewModel.DAID);

                if (destination != null && destination.DestID != destViewModel.destID && destination.DestDesc.ToUpper() == destViewModel.destDesc.ToUpper())
                {
                    return(true);
                }
                return(false);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public DestinationViewModel FindDestination(int?destID)
        {
            try
            {
                DestinationViewModel destViewModel = new DestinationViewModel();

                DestinationManager destManager = new DestinationManager();
                var dest = destManager.FindDestination(destID);

                destViewModel.destID   = dest.DestID;
                destViewModel.destDesc = dest.DestDesc;
                destViewModel.DAID     = dest.daId;

                return(destViewModel);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void GetDestinationDetails(int daId)
        {
            try
            {
                DestinationManager destManager = new DestinationManager();
                var destList = destManager.GetDestinationDetails(daId);

                DestList = new List <DestinationViewModel>();
                foreach (var item in destList)
                {
                    DestinationViewModel destViewModel = new DestinationViewModel();

                    destViewModel.destID   = item.DestID;
                    destViewModel.destDesc = item.DestDesc;
                    destViewModel.DAID     = item.daId;// 1;

                    DestList.Add(destViewModel);
                }
            }
            catch (Exception)
            {
                throw;
            }
        }