Exemplo n.º 1
0
        /// <summary>
        /// To the model.
        /// </summary>
        /// <param name="model">The model.</param>
        /// <returns></returns>
        public static ReferralReferredInformationModel ToModel(this ReferralReferredInformationViewModel model)
        {
            if (model == null)
            {
                return(null);
            }

            var entity = new ReferralReferredInformationModel
            {
                ReferredToDetailID = model.ReferredToDetailID,
                ActionTaken        = model.ActionTaken,
                Comments           = model.Comments,
                UserID             = model.UserID,
                ReferredDateTime   = model.ReferredDateTime,
                OrganizationID     = model.OrganizationID,
                ContactNo          = model.ContactNo,
                ReferralHeaderID   = model.ReferralHeaderID,
                ModifiedOn         = model.ModifiedOn
            };

            return(entity);
        }
Exemplo n.º 2
0
        /// <summary>
        /// To the view model.
        /// </summary>
        /// <param name="entity">The entity.</param>
        /// <returns></returns>
        public static ReferralReferredInformationViewModel ToViewModel(this ReferralReferredInformationModel entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var model = new ReferralReferredInformationViewModel
            {
                ReferredToDetailID = entity.ReferredToDetailID,
                ActionTaken        = entity.ActionTaken,
                Comments           = entity.Comments,
                UserID             = entity.UserID,
                ReferredDateTime   = entity.ReferredDateTime,
                OrganizationID     = entity.OrganizationID,
                ContactNo          = entity.ContactNo,
                ReferralHeaderID   = entity.ReferralHeaderID,
                ModifiedOn         = entity.ModifiedOn
            };

            return(model);
        }
        /// <summary>
        /// Updates the referral referred information.
        /// </summary>
        /// <param name="referral">The referred information.</param>
        /// <returns></returns>

        public Response <ReferralReferredInformationViewModel> UpdateReferredInformation(ReferralReferredInformationViewModel referral)
        {
            const string apiUrl = BaseRoute + "UpdateReferredInformation";

            return(communicationManager.Put <ReferralReferredInformationModel, Response <ReferralReferredInformationViewModel> >(referral.ToModel(), apiUrl));
        }
        /// <summary>
        /// Adds the referral referred information
        /// </summary>
        /// <param name="Referral">The referral referred information.</param>
        /// <returns></returns>

        public Response <ReferralReferredInformationViewModel> AddReferredInformation(ReferralReferredInformationViewModel referral)
        {
            const string apiUrl   = BaseRoute + "AddReferredInformation";
            var          response = communicationManager.Post <ReferralReferredInformationModel, Response <ReferralReferredInformationModel> >(referral.ToModel(), apiUrl);

            return(response.ToViewModel());
        }
 public Response <ReferralReferredInformationViewModel> UpdateReferredInformation(ReferralReferredInformationViewModel referral)
 {
     return(referralReferredInformationRepository.UpdateReferredInformation(referral));
 }