public static List <AppContact> ConvertServiceContactsToAppContacts(List <ApplicationService.contact> servicecontacts) { List <AppContact> tempContacts = new List <AppContact>(); foreach (ApplicationService.contact servicecontact in servicecontacts) { AppContact tempContact = new AppContact(); tempContact.id = servicecontact.contactid; tempContact.objectid = servicecontact.objectid; tempContact.Title = servicecontact.title; tempContact.FirstName = servicecontact.firstname; tempContact.LastName = servicecontact.lastname; tempContact.email = servicecontact.emailid; tempContact.secondaryemail = servicecontact.secondaryemail; tempContact.phone = servicecontact.phone; tempContact.mobile = servicecontact.mobile; tempContact.type = servicecontact.type; tempContact.objecttype = servicecontact.objecttype; tempContact.data = servicecontact.data; tempContact.createdby = servicecontact.createdby; tempContact.createdon = servicecontact.createddate; tempContact.creatorid = servicecontact.creatorid; tempContact.modifiedby = servicecontact.modifiedby; tempContact.modifiedon = servicecontact.modifieddate; tempContacts.Add(tempContact); } return(tempContacts); }
public AppContact GetEmployeeInformation(string employeeid, string companyid, string creatorid, string objectype) { AppContact employeeContact = new AppContact(); ApplicationService.contact con = appclient.GetEmployee(employeeid, companyid, creatorid); employeeContact = AppContact.ConvertServiceContactToAppContact(con); return(employeeContact); }
public List <AppContact> GetEmployees(string companyid, string creatorid) { ApplicationService.contact[] ServiceEmployees = appclient.GetEmployees(companyid, creatorid, "", ""); List <ApplicationService.contact> serviceemployeecollection = ServiceEmployees.ToList(); List <AppContact> employees = AppContact.ConvertServiceContactsToAppContacts(serviceemployeecollection); return(employees); }
public string CreateEmployee(string companyid, string userid, AppContact contact) { string employeeid = appclient.CreateEmployee(companyid, userid, "", contact.Designation, contact.Title, contact.FirstName, contact.LastName, contact.email, contact.phone, contact.secondaryemail, contact.mobile, contact.data, "", userid); return(employeeid); }
public AppContact GetContact(string contactid, string companyid, string objectid) { ApplicationService.contact servicecontact = new ApplicationService.contact(); AppContact returncontact = new AppContact(); try { servicecontact = appclient.GetContact(contactid, objectid, companyid); returncontact = AppContact.ConvertServiceContactToAppContact(servicecontact); } catch { } return(returncontact); }
public static AppContact ConvertServiceContactToAppContact(ApplicationService.contact servicecontact) { AppContact tempContact = new AppContact(); tempContact.id = servicecontact.contactid; tempContact.objectid = servicecontact.objectid; tempContact.Title = servicecontact.title; tempContact.FirstName = servicecontact.firstname; tempContact.LastName = servicecontact.lastname; tempContact.email = servicecontact.emailid; tempContact.secondaryemail = servicecontact.secondaryemail; tempContact.phone = servicecontact.phone; tempContact.mobile = servicecontact.mobile; tempContact.type = servicecontact.type; tempContact.objecttype = servicecontact.objecttype; tempContact.data = servicecontact.data; tempContact.createdby = servicecontact.createdby; tempContact.createdon = servicecontact.createddate; tempContact.creatorid = servicecontact.creatorid; tempContact.modifiedby = servicecontact.modifiedby; tempContact.modifiedon = servicecontact.modifieddate; return(tempContact); }
public AppContact GetEmployeeInformation(string employeeid, string companyid, string creatorid, string objectype) { AppContact employeeContact = new AppContact(); ApplicationService.contact con = appclient.GetEmployee(employeeid, companyid, creatorid); employeeContact = AppContact.ConvertServiceContactToAppContact(con); return employeeContact; }
public AppContact GetContact(string contactid, string companyid, string objectid) { ApplicationService.contact servicecontact = new ApplicationService.contact(); AppContact returncontact = new AppContact(); try { servicecontact = appclient.GetContact(contactid, objectid, companyid); returncontact = AppContact.ConvertServiceContactToAppContact(servicecontact); } catch { } return returncontact; }
public string CreateEmployee(string companyid, string userid, AppContact contact) { string employeeid = appclient.CreateEmployee(companyid, userid, "", contact.Designation, contact.Title, contact.FirstName, contact.LastName, contact.email, contact.phone, contact.secondaryemail, contact.mobile, contact.data, "", userid); return employeeid; }
public static AppContact ConvertServiceContactToAppContact(ApplicationService.contact servicecontact) { AppContact tempContact = new AppContact(); tempContact.id = servicecontact.contactid; tempContact.objectid = servicecontact.objectid; tempContact.Title = servicecontact.title; tempContact.FirstName = servicecontact.firstname; tempContact.LastName = servicecontact.lastname; tempContact.email = servicecontact.emailid; tempContact.secondaryemail = servicecontact.secondaryemail; tempContact.phone = servicecontact.phone; tempContact.mobile = servicecontact.mobile; tempContact.type = servicecontact.type; tempContact.objecttype = servicecontact.objecttype; tempContact.data = servicecontact.data; tempContact.createdby = servicecontact.createdby; tempContact.createdon = servicecontact.createddate; tempContact.creatorid = servicecontact.creatorid; tempContact.modifiedby = servicecontact.modifiedby; tempContact.modifiedon = servicecontact.modifieddate; return tempContact; }
public static List<AppContact> ConvertServiceContactsToAppContacts(List<ApplicationService.contact> servicecontacts) { List<AppContact> tempContacts = new List<AppContact>(); foreach (ApplicationService.contact servicecontact in servicecontacts) { AppContact tempContact = new AppContact(); tempContact.id = servicecontact.contactid; tempContact.objectid = servicecontact.objectid; tempContact.Title = servicecontact.title; tempContact.FirstName = servicecontact.firstname; tempContact.LastName = servicecontact.lastname; tempContact.email = servicecontact.emailid; tempContact.secondaryemail = servicecontact.secondaryemail; tempContact.phone = servicecontact.phone; tempContact.mobile = servicecontact.mobile; tempContact.type = servicecontact.type; tempContact.objecttype = servicecontact.objecttype; tempContact.data = servicecontact.data; tempContact.createdby = servicecontact.createdby; tempContact.createdon = servicecontact.createddate; tempContact.creatorid = servicecontact.creatorid; tempContact.modifiedby = servicecontact.modifiedby; tempContact.modifiedon = servicecontact.modifieddate; tempContacts.Add(tempContact); } return tempContacts; }
public List <AppContact> GetContacts(string companyid, string objectid) { ApplicationService.contact[] servicecontacts = appclient.GetContacts(objectid, companyid, "1", "100"); return(AppContact.ConvertServiceContactsToAppContacts(servicecontacts.ToList())); }