public ActionResult Manage(string listid) { Business.ApplicationService.AppServiceClient appclient = new Business.ApplicationService.AppServiceClient(); Business.ApplicationService.contact[] contacts = appclient.GetContacts("9a73072573754e13a02381c9d931e5c4", "9a73072573754e13a02381c9d931e5c4", "1", "100"); List <UI.Models.PortalContact> portalcontacts = new List <Models.PortalContact>(); foreach (Business.ApplicationService.contact contact in contacts) { UI.Models.PortalContact tempcontact = new Models.PortalContact(); tempcontact.id = contact.contactid; tempcontact.emailaddress = contact.emailid; portalcontacts.Add(tempcontact); } return(View(portalcontacts)); }
public ActionResult Index() { Business.ApplicationService.AppServiceClient appclient = new Business.ApplicationService.AppServiceClient(); Business.ApplicationService.contact[] contacts = appclient.GetContacts(Session["companyid"].ToString(), Session["companyid"].ToString(), "1", "100"); List <UI.Models.PortalContact> portalcontacts = new List <Models.PortalContact>(); foreach (Business.ApplicationService.contact contact in contacts) { UI.Models.PortalContact singlecontact = new Models.PortalContact(); try { UI.Models.PortalContact ObjContact = Newtonsoft.Json.JsonConvert.DeserializeObject <UI.Models.PortalContact>(contact.data); if (ObjContact == null) { singlecontact.Companyname = ""; singlecontact.middlename = ""; } else { singlecontact.Companyname = ObjContact.Companyname; singlecontact.middlename = ObjContact.middlename; } } catch { singlecontact.Companyname = ""; singlecontact.middlename = ""; } singlecontact.id = contact.contactid; singlecontact.firstname = contact.firstname; singlecontact.lastname = contact.lastname; singlecontact.emailaddress = contact.emailid; singlecontact.mobilephone = contact.mobile; singlecontact.officephone = contact.phone; singlecontact.objecttype = contact.objecttype; singlecontact.designation = contact.designation; portalcontacts.Add(singlecontact); } return(View(portalcontacts)); }
public ActionResult Index() { Business.ApplicationService.AppServiceClient appclient = new Business.ApplicationService.AppServiceClient(); Business.ApplicationService.contact[] contacts = appclient.GetContacts(Session["companyid"].ToString(), Session["companyid"].ToString(),"1","100"); List<UI.Models.PortalContact> portalcontacts = new List<Models.PortalContact>(); foreach (Business.ApplicationService.contact contact in contacts) { UI.Models.PortalContact singlecontact = new Models.PortalContact(); try { UI.Models.PortalContact ObjContact = Newtonsoft.Json.JsonConvert.DeserializeObject<UI.Models.PortalContact>(contact.data); if (ObjContact == null) { singlecontact.Companyname = ""; singlecontact.middlename = ""; } else { singlecontact.Companyname = ObjContact.Companyname; singlecontact.middlename = ObjContact.middlename; } } catch { singlecontact.Companyname = ""; singlecontact.middlename = ""; } singlecontact.id = contact.contactid; singlecontact.firstname = contact.firstname; singlecontact.lastname = contact.lastname; singlecontact.emailaddress = contact.emailid; singlecontact.mobilephone = contact.mobile; singlecontact.officephone = contact.phone; singlecontact.objecttype = contact.objecttype; singlecontact.designation = contact.designation; portalcontacts.Add(singlecontact); } return View(portalcontacts); }
public ActionResult Manage(string listid) { Business.ApplicationService.AppServiceClient appclient = new Business.ApplicationService.AppServiceClient(); Business.ApplicationService.contact[] contacts = appclient.GetContacts("9a73072573754e13a02381c9d931e5c4", "9a73072573754e13a02381c9d931e5c4","1","100"); List<UI.Models.PortalContact> portalcontacts = new List<Models.PortalContact>(); foreach (Business.ApplicationService.contact contact in contacts) { UI.Models.PortalContact tempcontact = new Models.PortalContact(); tempcontact.id = contact.contactid; tempcontact.emailaddress = contact.emailid; portalcontacts.Add(tempcontact); } return View(portalcontacts); }