public ActionResult SelectGroups() { ContactsBLL ocntsBLL = new ContactsBLL(); var details = ocntsBLL.GetUserGroups(Session["UserId"].ToString()); return(PartialView("_Groups", details)); }
public ActionResult AllContacts() { ContactsBLL ocntsBLL = new ContactsBLL(); var obj = ocntsBLL.GetUserContacts(Session["UserId"].ToString()); return(PartialView("_AllContacts", obj)); }
public ActionResult AddGroupContact(ContactsSummary obj) { ContactsBLL ocntsBLL = new ContactsBLL(); EventsBLL oeventsBLL = new EventsBLL(); List <GoogleContacts> odetails = new List <GoogleContacts>(); foreach (var item in obj.UserContacts) { if (item.Selected == true) { odetails.Add(new GoogleContacts( item.EmailID, item.UserId, item.Selected, item.GroupId )); } } obj.UserContacts = odetails.ToArray(); obj.createrId = Session["UserId"].ToString(); var status = ocntsBLL.AddContactsToGroups(obj); if (status == "1") { return(Content("Contact Added Successfully", "text/html")); } else { return(Content("Contact Adding Failed", "text/html")); } }
public ActionResult P_EditGroups(string Id) { ContactsBLL ocntsBLL = new ContactsBLL(); GroupDetails obj = new GroupDetails(); obj.Group_Id = Id; return(PartialView("_EditGroup", obj)); }
public ActionResult P_EditContact(string Id) { ContactsBLL ocntsBLL = new ContactsBLL(); EditContact ocnt = new EditContact(); ocnt.Id = Id; return(PartialView("_EditContact", ocnt)); }
public ActionResult P_DeleteGroups(string Id, string Name) { ContactsBLL ocntsBLL = new ContactsBLL(); GroupDetails obj = new GroupDetails(); obj.Group_Id = Id; obj.Group_Name = Name; return(PartialView("_DeleteGroup", obj)); }
public ActionResult P_DeleteGroupContact(string Id, string Contact_Id) { ContactsBLL ocntsBLL = new ContactsBLL(); DeleteContact ocnt = new DeleteContact(); ocnt.Id = Id; ocnt.Contact_Id = Contact_Id; return(PartialView("_RemoveGroupContact", ocnt)); }
// // GET: /MyContact/ public ActionResult Index(string msg) { ContactsBLL ocntsBLL = new ContactsBLL(); var obj = ocntsBLL.GetUserContacts(Session["UserId"].ToString()); MyContacts ocon = new MyContacts(); ocon.UserContacts = obj; ViewBag.Message = msg; return(View(ocon)); }
public ActionResult P_AddContact(string Group_Id) { ContactsBLL ocntsBLL = new ContactsBLL(); var obj = ocntsBLL.GetUserContacts(Session["UserId"].ToString()); ContactsSummary osummary = new ContactsSummary(); osummary.UserContacts = obj; osummary.groupId = Group_Id; return(PartialView("_AddGroupContacts", osummary));; }
public ActionResult GroupSummary(string GroupId) { ContactsBLL ocntsBLL = new ContactsBLL(); var obj = ocntsBLL.GetGroupContacts(GroupId); foreach (var items in obj) { items.GroupId = GroupId; } return(PartialView("_ContactsList", obj)); }
public ActionResult Delete_Contact(string Id) { ContactsBLL ocntsBLL = new ContactsBLL(); DeleteContact ocnt = new DeleteContact(); ocnt.Id = Session["UserId"].ToString(); ocnt.Contact_Id = Id; var details = ocntsBLL.DeleteContact(ocnt); return(Content("Contact Deleted Sucessfully", "text/html")); }
public ActionResult DeleteGroups(string Id) { ContactsBLL ocntsBLL = new ContactsBLL(); var status = ocntsBLL.DeleteGroup(Id); if (status == "1") { return(Content("Group Deleted Successfully", "text/html")); } else { return(Content("Group Deletion Failed", "text/html")); } }
public ActionResult EditContact_Details(EditContact obj) { ContactsBLL ocntsBLL = new ContactsBLL(); var status = ocntsBLL.EditContact(obj); if (status == "1") { return(Content("Contact Updated Sucessfully", "text/html")); } else { return(Content("Failed to Update Contact", "text/html")); } }
public ActionResult CreateGroups(MyContacts obj) { ContactsBLL ocntsBLL = new ContactsBLL(); obj.CreateGroup.User_Id = Session["UserId"].ToString(); var status = ocntsBLL.CreateUserGroup(obj.CreateGroup); if (status == "1") { return(Content("Group Created Successfully", "text/html")); } else { return(Content("Group Createation Failed", "text/html")); } }
public ActionResult EditGroups(GroupDetails obj) { ContactsBLL ocntsBLL = new ContactsBLL(); obj.User_Id = Session["UserId"].ToString(); var status = ocntsBLL.EditGroup(obj); if (status == "1") { return(Content("Group Name Updated Successfully", "text/html")); } else { return(Content("Group Name Updation Failed", "text/html")); } }
public ActionResult Delete_GroupContact(string Id, string Contact_Id) { ContactsBLL ocntsBLL = new ContactsBLL(); DeleteContact ocnt = new DeleteContact(); ocnt.Id = Id; ocnt.Contact_Id = Contact_Id; var status = ocntsBLL.DeleteGroupContact(ocnt); if (status == "1") { return(Content("Contact Removed Sucessfully", "text/html")); } else { return(Content("Failed to remove Contact", "text/html")); } }
public ActionResult P_InviteMembers(string wishlist_id, string Event_id) { ContactsBLL ocntsBLL = new ContactsBLL(); var obj = ocntsBLL.GetUserContacts(Session["UserId"].ToString()); InviteContacts osummary = new InviteContacts(); List <InviteMembers> olist = new List <InviteMembers>(); foreach (var item in obj) { olist.Add(new InviteMembers( item.EmailID, item.UserId, item.ContactNo, "", false)); } osummary.wishlist_Id = wishlist_id; osummary.Event_Id = Event_id; osummary.InvitedMembers = olist.ToArray(); return(PartialView("_InviteMembers", osummary));; }
public ActionResult AddContactManually(EditContact details) { ContactsBLL ocontactsBLL = new ContactsBLL(); List <GoogleContacts> olist = new List <GoogleContacts>(); if (!string.IsNullOrEmpty(details.EmailId) & !string.IsNullOrEmpty(details.Phone_No)) { olist.Add(new GoogleContacts( Session["UserId"].ToString(), details.EmailId, details.Name, details.Phone_No)); string status = ocontactsBLL.Import_Google(olist.ToArray()); return(Content("Contact Added Sucessfully", "text/html")); } else { return(Content("Contact Adding Falied", "text/html")); } }
public ActionResult AddGoogleContacts() { ContactsBLL ocontactsBLL = new ContactsBLL(); string code = Request.QueryString["code"]; if (!string.IsNullOrEmpty(code)) { var contacts = GetAccessToken().ToArray(); List <GoogleContacts> olist = new List <GoogleContacts>(); foreach (var item in contacts) { if (!string.IsNullOrEmpty(item.EmailID)) { olist.Add(new GoogleContacts( Session["UserId"].ToString(), item.EmailID, string.Empty, string.Empty)); } } string status = ocontactsBLL.Import_Google(olist.ToArray()); } return(RedirectToAction("Index", "MyContact", new { msg = "Contact Imported Sucessfully" })); }