public Models.Customer Login(string Email, string Password) { using (PersonServiceClient proxy = new PersonServiceClient()) { Customer customer = null; Models.Customer Cc = new Models.Customer(); if (Email != null || Password != null) { try { customer = proxy.LoginCustomer(Email, Password); } catch (System.NullReferenceException e) { Debug.WriteLine(e.Message); Cc = null; } if (customer != null) { Cc.Email = customer.Email; Cc.Password = customer.Password; Cc.CustomerId = customer.CustomerId; Cc.FName = customer.FName; Cc.LName = customer.LName; Cc.PhoneNo = customer.PhoneNo; } } return(Cc); } }