Beispiel #1
0
        public static List <UserClientContact> GetUserClientContacts(int _UserID)
        {
            List <UserClientContact> clientContacts = new List <UserClientContact>();
            UsersDataContext         dc             = new UsersDataContext();
            var result = dc.S1_Users_ClientContactsFromUserID(_UserID);

            foreach (var item in result)
            {
                UserClientContact tempClientContact = new UserClientContact(item.ClientContactID, item.ClientContactName, item.ClientContactFirstName, item.ClientContactLastName,
                                                                            item.ClientContactTitle, item.ClientContactAddress1, item.ClientContactAddress2, item.ClientContactCity, item.ClientContactStateCode,
                                                                            item.ClientContactZIP, item.ClientContactBusinessPhone, item.ClientContactCellPhone, item.ClientContactFax, item.ClientContactEmail,
                                                                            item.BillingContactName, item.IsPrimaryBillingContact1, item.OnlyShowInvoices, Convert.ToInt32(item.ClientID), Convert.ToInt32(item.UserID),
                                                                            item.BillingDeliveryMethod, Convert.ToBoolean(item.IsBillingContact), item.LastLoginDate, item.BillAsClientName, item.DueText,
                                                                            item.BillingContactAddress1, item.BillingContactAddress2, item.BillingContactCity, item.BillingContactStateCode, item.BillingContactZIP,
                                                                            item.BillingContactEmail, item.BillingContactBusinessPhone, item.BillingContactFax, item.BillingContactPOName, item.BillingContactPONumber,
                                                                            item.BillingContactNotes, Convert.ToBoolean(item.ClientContactStatus), Convert.ToBoolean(item.BillingContactStatus), item.BillingContactID, item.ClientName);
                clientContacts.Add(tempClientContact);
            }

            return(clientContacts);
        }