Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
        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);
        }
Exemplo n.º 6
0
        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);
        }
Exemplo n.º 7
0
 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;
 }
Exemplo n.º 8
0
        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;
        }
Exemplo n.º 9
0
 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;
        }
Exemplo n.º 12
0
 public List <AppContact> GetContacts(string companyid, string objectid)
 {
     ApplicationService.contact[] servicecontacts = appclient.GetContacts(objectid, companyid, "1", "100");
     return(AppContact.ConvertServiceContactsToAppContacts(servicecontacts.ToList()));
 }