public static IEnumerable <FilialeInfo> GetAllFiliale() { using (var client = ClientProxy.CreateMISWcfClient()) { var items = client.Instance.GetAllFiliale(); foreach (var item in items) { if (item.IsActive) { yield return new FilialeInfo { Address = item.Address, Code = item.Code, ID = item.ID, IsActive = item.IsActive, ParentId = item.ParentId, Name = item.Name, Rank = item.Rank, FilialeTypes = item.FilialeTypes, ShopJoinType = item.ShopJoinType, GoodsTypes = item.GoodsTypes } } ; } } }
public static bool VerifyIsAllowVisitPage(Guid personnelId, Guid systemId, string pageUrl) { using (var client = ClientProxy.CreateMISWcfClient()) { return(client.Instance.VerifyPageIsVisitPermission(personnelId, systemId, pageUrl)); } }
/// <summary> /// 获取所有职位 /// </summary> /// <returns></returns> public static IEnumerable <SystemPositionInfo> GetAllSystemPositionList() { using (var client = ClientProxy.CreateMISWcfClient()) { return(client.Instance.GetSystemBranchPosition().OrderBy(w => w.OrderIndex).ToList()); } }
/// <summary> /// /// </summary> /// <param name="filialeiId"></param> /// <param name="systemBranchId"></param> /// <returns></returns> public static IList <LoginAccountInfo> GetLoginAccountListBySystemBranchId(Guid filialeiId, Guid systemBranchId) { using (var client = ClientProxy.CreateMISWcfClient()) { return(client.Instance.GetLoginAccountListBySystemBranchId(filialeiId, systemBranchId)); } }
public IList <PersonnelInfo> GetAccountInfoByRealName(string realName) { using (var client = ClientProxy.CreateMISWcfClient()) { var info = client.Instance.GetAccountInfoByRealName(realName); List <PersonnelInfo> personnel = new List <PersonnelInfo>(); foreach (var loginAccountInfo in info) { personnel.Add(new PersonnelInfo { PersonnelId = loginAccountInfo.PersonnelId, RealName = loginAccountInfo.RealName, AccountNo = loginAccountInfo.AccountNo, EnterpriseNo = loginAccountInfo.AccountNo, IsActive = loginAccountInfo.IsActive, SystemBrandPositionId = loginAccountInfo.SystemBranchPositionID, FilialeId = loginAccountInfo.PositionInfo != null ? loginAccountInfo.PositionInfo.FilialeId : Guid.Empty, BranchId = loginAccountInfo.PositionInfo != null ? loginAccountInfo.PositionInfo.BranchId : Guid.Empty, PositionId = loginAccountInfo.PositionInfo != null ? loginAccountInfo.PositionInfo.ID : Guid.Empty, CurrentFilialeId = Guid.Empty }); } return(personnel); } }
/// <summary> /// 获取所有部门集合 /// </summary> /// <returns></returns> public static IEnumerable <BranchInfo> GetAllBranch() { using (var client = ClientProxy.CreateMISWcfClient()) { return(client.Instance.GetAllFilialeBranch().OrderBy(w => w.OrderIndex).ToList()); } }
/// <summary> /// 读取公司信息 /// </summary> /// <returns></returns> private static IEnumerable <FilialeInfo> GetAllMisFiliales() { using (var client = ClientProxy.CreateMISWcfClient()) { var items = client.Instance.GetAllFiliale(); if (items != null && items.Any()) { foreach (var item in items.OrderBy(w => w.OrderIndex)) { if (item.IsActive) { yield return(new FilialeInfo { ID = item.ID, Address = item.Address, Code = item.Code, Description = item.Description, Name = item.Name, RealName = item.RealName, ParentId = item.ParentId, Rank = item.Rank, ShopJoinType = item.ShopJoinType, TaxNumber = item.TaxNumber, RegisterAddress = item.RegisterAddress, IsActive = item.IsActive, FilialeTypes = item.FilialeTypes, GoodsTypes = item.GoodsTypes, IsSaleFiliale = item.IsSaleFiliale }); } } } } }
public static LoginAccountInfo GetAccountInfoByPersonnelId(Guid personnelId) { using (var client = ClientProxy.CreateMISWcfClient()) { return(client.Instance.GetAccountInfoByPersonnelId(personnelId)); } }
public static IList <MenuInfo> GetMenuList(Guid systemId) { using (var client = ClientProxy.CreateMISWcfClient()) { return(client.Instance.GetMenuList(systemId).OrderBy(w => w.OrderIndex).ToList()); } }
public static bool VerifyIsAllowPageOperation(Guid personnelId, Guid systemId, string pageUrl, string pointCode) { using (var client = ClientProxy.CreateMISWcfClient()) { //return true; return(client.Instance.VerifyPageOperationIsVisitPermission(personnelId, systemId, pageUrl, pointCode)); } }
public PersonnelInfo Get(string accountNo) { using (var client = ClientProxy.CreateMISWcfClient()) { var info = client.Instance.GetAccountInfo(accountNo); return(new PersonnelInfo(info)); } }
public PersonnelInfo Get(Guid personnelId) { using (var client = ClientProxy.CreateMISWcfClient()) { var info = client.Instance.GetAccountInfoByPersonnelId(personnelId); return(new PersonnelInfo(info)); } }
public IList <PersonnelInfo> GetList() { var list = new List <PersonnelInfo>(); using (var client = ClientProxy.CreateMISWcfClient()) { var items = client.Instance.GetAllLoginAccount(); list.AddRange(items.Select(item => new PersonnelInfo(item)) .Where(personnelInfo => personnelInfo.PersonnelId != Guid.Empty && personnelInfo.IsActive)); } return(list); }
static Guid GetFilialeIdBySalePlatform(Guid targetId) { using (var client = ClientProxy.CreateMISWcfClient()) { var salePlatformInfo = client.Instance.GetSalePlatformInfo(targetId); if (salePlatformInfo != null && salePlatformInfo.ID != Guid.Empty) { return(salePlatformInfo.FilialeId); } return(targetId); } }
public string GetName(Guid personnelId) { using (var client = ClientProxy.CreateMISWcfClient()) { var info = client.Instance.GetAccountInfoByPersonnelId(personnelId); if (info != null) { return(info.RealName); } return(string.Empty); } }
public static Model.LoginResultInfo VerifyLoginToken(string token) { using (var client = ClientProxy.CreateMISWcfClient()) { var info = client.Instance.VerifyLoginToken(token); if (info == null) { return(new Model.LoginResultInfo(new MIS.Model.View.LoginResultInfo("登录口令验证通信失败"))); } return(new Model.LoginResultInfo(info)); } }
/// <summary> /// /// </summary> /// <param name="filialeId"></param> /// <param name="branchId"></param> /// <returns></returns> public IEnumerable <PersonnelInfo> GetList(Guid filialeId, Guid branchId) { var list = new List <PersonnelInfo>(); using (var client = ClientProxy.CreateMISWcfClient()) { var items = client.Instance.GetAllLoginAccount(); list.AddRange(items.Select(item => new PersonnelInfo(item)) .Where(personnelInfo => personnelInfo.PersonnelId != Guid.Empty && personnelInfo.IsActive && personnelInfo.FilialeId == filialeId && personnelInfo.BranchId == branchId)); } return(list); }
/// <summary> /// /// </summary> /// <param name="personnelIds"></param> /// <returns></returns> public static Dictionary <Guid, Guid> GetBranchIdsByPersonnelIds(IList <Guid> personnelIds) { using (var client = ClientProxy.CreateMISWcfClient()) { var result = client.Instance.GetAccountsByPersonnelIds(personnelIds); if (result != null) { result = result.Where(p => p != null && p.PositionInfo != null && (!p.PositionInfo.BranchId.Equals(Guid.Empty))).ToList(); return(result.ToDictionary(k => k.PersonnelId, v => v.PositionInfo.BranchId)); } return(new Dictionary <Guid, Guid>()); } }
/// <summary> /// 获取所有销售平台集合 /// </summary> /// <returns></returns> public static IEnumerable <SalePlatformInfo> GetAllSalePlatform() { using (var client = ClientProxy.CreateMISWcfClient()) { var items = client.Instance.GetAllSalePlatform().ToList(); foreach (var item in items) { yield return(new SalePlatformInfo { FilialeId = item.FilialeId, ID = item.ID, IsActive = item.IsActive, Name = item.Name, Url = item.Url, ExternalName = item.ExternalName, AccountCheckingType = item.AccountCheckingType }); } } }
public static FilialeInfo GetFiliaeInfo(Guid filialeId) { using (var client = ClientProxy.CreateMISWcfClient()) { var item = client.Instance.GetFilialeInfo(filialeId); return(new FilialeInfo { Address = item.Address, Code = item.Code, ID = item.ID, IsActive = item.IsActive, ParentId = item.ParentId, Name = item.Name, Rank = item.Rank, FilialeTypes = item.FilialeTypes, ShopJoinType = item.ShopJoinType, GoodsTypes = item.GoodsTypes }); } }