public ActionResult loadarchive() { string AllProfileId = string.Empty; Domain.Socioboard.Domain.User objUser = (Domain.Socioboard.Domain.User)Session["User"]; Api.ArchiveMessage.ArchiveMessage ApiobjArchiveMessage = new Api.ArchiveMessage.ArchiveMessage(); Dictionary <Domain.Socioboard.Domain.TeamMemberProfile, object> allprofileofuser = SBUtils.GetUserProfilesccordingToGroup(); foreach (var item in allprofileofuser) { try { AllProfileId += item.Key.ProfileId + ','; } catch (Exception Err) { Console.Write(Err.StackTrace); } } try { AllProfileId = AllProfileId.Substring(0, (AllProfileId.Length - 1)); } catch (Exception ex) { Console.WriteLine(ex.StackTrace); } List <Domain.Socioboard.Domain.ArchiveMessage> lstAllArchive = (List <Domain.Socioboard.Domain.ArchiveMessage>)(new JavaScriptSerializer().Deserialize(ApiobjArchiveMessage.GetAllArchiveMessagesDetails(objUser.Id.ToString(), AllProfileId), typeof(List <Domain.Socioboard.Domain.ArchiveMessage>))); return(PartialView("_ArchivePartial", lstAllArchive)); }
public ActionResult DeleteArchiveMessage() { try { Api.ArchiveMessage.ArchiveMessage ApiobjArchiveMessage = new Api.ArchiveMessage.ArchiveMessage(); Domain.Socioboard.Domain.User objUser = (Domain.Socioboard.Domain.User)Session["User"]; string ProfileId = Request.QueryString["ProfileId"]; string MessageId = Request.QueryString["MessageId"]; string Network = Request.QueryString["network"]; string UserName = Request.QueryString["username"]; string MessageDate = Request.QueryString["MessageDate"]; string ProfileUrl = Request.QueryString["profileurl"]; string Message = Request.QueryString["message"]; try { ApiobjArchiveMessage.DeleteArchiveMessage(objUser.Id.ToString(), ProfileId, Network, UserName, MessageId, Message, MessageDate, ProfileUrl); return(Content("Archived successfully")); } catch (Exception ex) { Console.WriteLine(ex.StackTrace); return(Content("Somthing went wrong!!")); } } catch (Exception ex) { Console.WriteLine(ex.StackTrace); return(Content("")); } }
public async Task<ActionResult> loadarchive() { string AllProfileId = string.Empty; Domain.Socioboard.Domain.User objUser = (Domain.Socioboard.Domain.User)Session["User"]; Api.ArchiveMessage.ArchiveMessage ApiobjArchiveMessage = new Api.ArchiveMessage.ArchiveMessage(); //Dictionary<Domain.Socioboard.Domain.TeamMemberProfile, object> allprofileofuser =await SBUtils.GetUserProfilesccordingToGroup(); Dictionary<Domain.Socioboard.Domain.GroupProfile, object> allprofileofuser = await SBHelper.GetGroupProfiles(); foreach (var item in allprofileofuser) { try { AllProfileId += item.Key.ProfileId + ','; } catch (Exception Err) { Console.Write(Err.StackTrace); } } try { AllProfileId = AllProfileId.Substring(0, (AllProfileId.Length - 1)); } catch (Exception ex) { Console.WriteLine(ex.StackTrace); } List<Domain.Socioboard.Domain.ArchiveMessage> lstAllArchive = (List<Domain.Socioboard.Domain.ArchiveMessage>)(new JavaScriptSerializer().Deserialize(ApiobjArchiveMessage.GetAllArchiveMessagesDetails(objUser.Id.ToString(), AllProfileId), typeof(List<Domain.Socioboard.Domain.ArchiveMessage>))); return PartialView("_ArchivePartial", lstAllArchive); }
public ActionResult SaveArchiveMessage() { try { Api.ArchiveMessage.ArchiveMessage ApiobjArchiveMessage = new Api.ArchiveMessage.ArchiveMessage(); Domain.Socioboard.Domain.User objUser = (Domain.Socioboard.Domain.User)Session["User"]; string ProfileId = Request.QueryString["ProfileId"]; string MessageId = Request.QueryString["MessageId"]; string Network = Request.QueryString["network"]; string UserName = Request.QueryString["username"]; string MessageDate = Request.QueryString["MessageDate"]; string ProfileUrl = Request.QueryString["profileurl"]; string Message = Request.Form["message"]; try { if (!ApiobjArchiveMessage.CheckArchiveMessageExists(objUser.Id.ToString(), MessageId)) { ApiobjArchiveMessage.AddArchiveMessage(objUser.Id.ToString(), ProfileId, Network, UserName, MessageId, Message, MessageDate, ProfileUrl); ApiobjArchiveMessage.DeleteArchiveMessage(objUser.Id.ToString(), MessageId, Network); return Content("Archived successfully"); } else { return Content("Message already Archived"); } } catch (Exception ex) { Console.WriteLine(ex.StackTrace); return Content("Somthing went wrong!!"); } } catch (Exception ex) { Console.WriteLine(ex.StackTrace); return Content(""); } }