public async Task <JsonResult> ShareImages(ShareAlbum model) { string host = httpContextAccessor.HttpContext.Request.Host.Value; string Path = host + "/Common/Share"; if (model.IsAlbum) { Path = Path + "?albumId=" + model.SId; } else { Path = Path + "?imgId=" + model.SId; } Path = "<a href='" + Path + "' >" + Path + "</a>"; //GET credentials of particular user to share album bool issend = LookMemoriesSharing.SendEmail("Look Memories", Path, model.SEmailId, configuration["SenderEmialId"], configuration["Password"]); //SHARE album if successful if (issend) { toastNotification.AddSuccessToastMessage("Album share Succesfully"); } //GIVE an Error if unsuccessful else { toastNotification.AddErrorToastMessage("There is some issue, kindly write the correct email address."); } return(Json(issend)); }
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { base.OnCreateView(inflater, container, savedInstanceState); mShareAlbum = new ShareAlbum(); var view = inflater.Inflate(Resource.Layout.ShareFilePage, container, false); Button cancelBtn = view.FindViewById <Button>(Resource.Id.cancelBtn); cancelBtn.Click += CancelClick; Button confirmBtn = view.FindViewById <Button>(Resource.Id.confirmBtn); confirmBtn.Click += ConfirmClick; mRecyclerView = (RecyclerView)view.FindViewById(Resource.Id.sharedUserRecyclerView); mRecyclerView.SetLayoutManager(new LinearLayoutManager(currentContext)); mAdapter = new ShareAdapter(mShareAlbum, currentContext); ShareAdapter adapter = new ShareAdapter(mShareAlbum, currentContext); mRecyclerView.SetAdapter(adapter); return(view); }