public static List <Alading.Entity.User> GetUser(string account, string pwd) //获取员工 { AladingWebService.WebService wsc = new Alading.WebService.AladingWebService.WebService(); List <Alading.Entity.User> result = new List <Alading.Entity.User>(); try { var x = wsc.GetUsers(account, HashProvider.GetHash(pwd)); if (x != null) { foreach (var y in x) { if (y.Account.Contains(":")) { Alading.Entity.User user = new Alading.Entity.User(); user.UserCode = y.UserCode; user.tel = y.Tel; user.account = y.Account; user.addr = y.Address; user.nick = y.UserName; user.password = y.Password; result.Add(user); } } } } catch (Exception e) { throw e; } return(result); }
public static Alading.Entity.User GetMainUser(string account, string pwd) //获取主号 { AladingWebService.WebService wsc = new Alading.WebService.AladingWebService.WebService(); Alading.Entity.User user = new Alading.Entity.User(); try { var mainUser = wsc.GetUser(account, HashProvider.GetHash(pwd)); user.UserCode = mainUser.UserCode; user.tel = mainUser.Tel; user.account = mainUser.Account; user.addr = mainUser.Address; user.nick = mainUser.UserName; user.password = mainUser.Password; } catch (Exception e) { throw e; } return(user); }