示例#1
0
 //获取系统信息(会员类型,区域,商品类型)
 public static void RequestSysInfo(DataResultBlock result)
 {
     SysManage.Manage().RequestSysEvent += result;
     SysManage.Manage().GetAreaList();
     SysManage.Manage().GetProductTypes();
     SysManage.Manage().GetMemberLvList();
     SysManage.Manage().GetManagerList();
     SysManage.Manage().GetStaffList();
 }
示例#2
0
        //更新管理员数据(管理员管理界面使用)
        public static void UpdateManagerData(IList <StructRole> temmanagers)
        {
            SysManage.Manage().managers.Clear();
            SysManage.Manage().managerDict.Clear();

            foreach (StructRole role in temmanagers)
            {
                SysManage.Manage().managerDict.Add(role.Roleid, role);
                SysManage.Manage().managers.Add(role);
            }
        }
示例#3
0
        //更新员工数据(修改短信推送,修改员工信息)
        public static void UpdateStaffData(IList <StructAccount> tem)
        {
            SysManage.Manage().staffs.Clear();
            SysManage.Manage().staffDict.Clear();

            foreach (StructAccount staff in tem)
            {
                SysManage.Manage().staffDict.Add(staff.Guid, staff);
                SysManage.Manage().staffs.Add(staff);
            }
        }
示例#4
0
        //更新商品类别
        public static void UpdateProductData(IList <StructDictItem> newProductTypes)
        {
            SysManage.Manage().productTypes.Clear();
            SysManage.Manage().productDict.Clear();

            foreach (StructDictItem item in newProductTypes)
            {
                ProductTypeModel model = new ProductTypeModel(item);
                SysManage.Manage().productTypes.Add(model);
                SysManage.Manage().productDict.Add(item.Code, model);
            }
        }
示例#5
0
        // 更新区域数据
        public static void UpdateAreaData(IList <StructDictItem> items)
        {
            SysManage.Manage().areas.Clear();
            SysManage.Manage().areaDict.Clear();

            foreach (StructDictItem item in items)
            {
                AreaTypeModel model = new AreaTypeModel(item);
                SysManage.Manage().areaDict.Add(item.Code.ToString(), model);
                SysManage.Manage().areas.Add(model);
            }
        }
示例#6
0
        //更新会员数据(会员等级设定使用)
        public static void UpdateMemberTypeData(IList <StructDictItem> newMemberTypes)
        {
            SysManage.Manage().memberTypes.Clear();
            SysManage.Manage().memberDict.Clear();

            foreach (StructDictItem item in newMemberTypes)
            {
                MemberTypeModel model = new MemberTypeModel(item);
                SysManage.Manage().memberDict.Add(item.Code, model);
                SysManage.Manage().memberTypes.Add(model);
            }
        }
示例#7
0
        //获取员工姓名
        public static string GetStaffName(string id)
        {
            StructAccount staff;

            SysManage.Manage().staffDict.TryGetValue(id, out staff);
            if (staff == null)
            {
                return("该员工已移除");
            }
            else
            {
                return(staff.Nickname);
            }
        }
示例#8
0
        //获取管理员名称
        public static string GetManagerName(string id)
        {
            StructRole role;

            SysManage.Manage().managerDict.TryGetValue(id, out role);
            if (role == null)
            {
                return("该管理员角色已移除");
            }
            else
            {
                return(role.Name);
            }
        }
示例#9
0
        //获取区域名称
        public static string GetAreaName(string code)
        {
            AreaTypeModel item = null;

            SysManage.Manage().areaDict.TryGetValue(code, out item);
            if (item == null)
            {
                return("未标注区域");
            }
            else
            {
                return(item.areaName);
            }
        }
示例#10
0
        // 获取产品类型名称
        public static string GetProductTypeName(int code)
        {
            ProductTypeModel item;

            SysManage.Manage().productDict.TryGetValue(code, out item);

            if (item == null)
            {
                return("该类型已移除");
            }
            else
            {
                return(item.typeName);
            }
        }
示例#11
0
 //获取会员类型名称
 public static string GetMemberTypeName(string temId)
 {
     try
     {
         int             id = int.Parse(temId);
         MemberTypeModel model;
         SysManage.Manage().memberDict.TryGetValue(id, out model);
         if (model == null)
         {
             return("该会员等级已移除");
         }
         else
         {
             return(model.typeName);
         }
     }
     catch (Exception exc)
     {
         return("");
     }
 }
示例#12
0
 public static void RemoveRequestSysInfo(DataResultBlock result)
 {
     SysManage.Manage().RequestSysEvent -= result;
 }