123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace LYFZ.Software.MainBusiness.VersionControl
- {
- public class StaticVersion
- {
- /// <summary>
- /// 权限控制按钮功能
- /// </summary>
- /// <param name="enumFunction">枚举类型</param>
- /// <param name="hideControls">需要隐藏的控件</param>
- /// <param name="moveControls">可移动的控件</param>
- /// <param name="moveValueList">被移动的内容值</param>
- public static bool BindVersionShowHideControl(VersionFunctionEnum enumFunction,
- List<System.Windows.Forms.Control> hideControls,
- List<System.Windows.Forms.Control> moveControls,
- List<string> moveValueList)
- {
- bool b=true;
- switch (enumFunction)
- {
- case VersionFunctionEnum.财务管理扫码支付:
- b = LYFZSS.SystemSpecterPossessed.
- ISystemSpecterPossessed.LargeResolveSystemSpecterPossessed(
- LYFZSS.SystemSpecterType.SST_D);
- if (!b)
- {
- SwitchVersionFunctionInterface.SwitchVersionFunction(EnumVersionFunctionType.VersionFuncionOne).RemoveDrowDownListData(hideControls[0], new string[] { "WXSKZF", "ZFBTMZF" });
- }
- break;
- case VersionFunctionEnum.财务管理证件照:
- case VersionFunctionEnum.财务管理薪资执行:
- case VersionFunctionEnum.核算工资流程:
- case VersionFunctionEnum.核算工资套系:
- case VersionFunctionEnum.核算工资支付方式:
- case VersionFunctionEnum.核算工资满意度:
- case VersionFunctionEnum.核算工资来源:
- case VersionFunctionEnum.核算工资成长套系据次数:
- case VersionFunctionEnum.客服中心流程把控客服沟通登记:
- case VersionFunctionEnum.客服中心回访调查自定义回访项目:
- case VersionFunctionEnum.客服中心客服安排:
- case VersionFunctionEnum.客户管理意向客户跟踪登记提醒:
- case VersionFunctionEnum.客户管理沟通再次提醒:
- case VersionFunctionEnum.开单保存意向订单:
- case VersionFunctionEnum.开单自动开会员:
- case VersionFunctionEnum.开单礼包功能:
- case VersionFunctionEnum.订单拍照重拍标注:
- case VersionFunctionEnum.订单拍照导片同时计件:
- case VersionFunctionEnum.订单修片外发修片:
- case VersionFunctionEnum.订单修片导片同时计件:
- case VersionFunctionEnum.订单选片加减乘除:
- case VersionFunctionEnum.订单精修外发精修:
- case VersionFunctionEnum.订单设计外发设计:
- case VersionFunctionEnum.订单发片取件按厂家发片回件:
- case VersionFunctionEnum.员工考勤员工档期:
- case VersionFunctionEnum.会员管理摄友会会员:
- b = LYFZSS.SystemSpecterPossessed.
- ISystemSpecterPossessed.LargeResolveSystemSpecterPossessed(
- LYFZSS.SystemSpecterType.SST_D);
- if (!b)
- {
- //VersionFunction.ShowOrHideControl(hideControls, moveControls);
- SwitchVersionFunctionInterface.SwitchVersionFunction(EnumVersionFunctionType.VersionFuncionOne).ShowOrHideControl(hideControls, moveControls);
- }
- break;
- case VersionFunctionEnum.核算工资订单类型:
- case VersionFunctionEnum.开单成本管控保利系数:
- case VersionFunctionEnum.订单修片分片:
- case VersionFunctionEnum.订单选片云选片:
- case VersionFunctionEnum.订单选片选P:
- case VersionFunctionEnum.订单选片选主题:
- case VersionFunctionEnum.订单设计云看版:
- case VersionFunctionEnum.会员管理服务卡会员:
- case VersionFunctionEnum.订单发片取件扫码回件取件:
- case VersionFunctionEnum.短信管理医院跟踪短信:
- case VersionFunctionEnum.礼服管理:
- case VersionFunctionEnum.医院跟踪系统意向单查询:
- case VersionFunctionEnum.沟通助手:
- case VersionFunctionEnum.短信管理微信短信推送:
- b = LYFZSS.SystemSpecterPossessed.
- ISystemSpecterPossessed.LargeResolveSystemSpecterPossessed(
- LYFZSS.SystemSpecterType.SST_C);
- if (!b)
- {
- //VersionFunction.ShowOrHideControl(hideControls, moveControls);
- SwitchVersionFunctionInterface.SwitchVersionFunction(EnumVersionFunctionType.VersionFuncionOne).ShowOrHideControl(hideControls, moveControls);
- }
- break;
- }
- return b;
- }
- public static void BindVersionShowHideTabControl(VersionFunctionEnum enumFunction,
- System.Windows.Forms.TabControl tabControl,
- List<System.Windows.Forms.TabPage> hideControls)
- {
- bool b;
- switch (enumFunction)
- {
- case VersionFunctionEnum.客服中心沟通助手转介绍客人:
- case VersionFunctionEnum.客服中心沟通助手会员积分:
- case VersionFunctionEnum.客服中心沟通助手孕妇周期:
- b = LYFZSS.SystemSpecterPossessed.
- ISystemSpecterPossessed.LargeResolveSystemSpecterPossessed(
- LYFZSS.SystemSpecterType.SST_D);
- if (!b)
- {
- //VersionFunction.ShowOrHideControl(hideControls, moveControls);
- SwitchVersionFunctionInterface.SwitchVersionFunction(EnumVersionFunctionType.VersionFuncionOne).ShowOrHideTabControl(tabControl, hideControls);
- }
- break;
- case VersionFunctionEnum.客服中心沟通助手结婚客人:
- case VersionFunctionEnum.客服中心沟通助手纪念日客人:
- case VersionFunctionEnum.客服中心沟通助手客户生日:
- case VersionFunctionEnum.客服中心沟通助手宝宝生日:
- b = LYFZSS.SystemSpecterPossessed.
- ISystemSpecterPossessed.LargeResolveSystemSpecterPossessed(
- LYFZSS.SystemSpecterType.SST_C);
- if (!b)
- {
- //VersionFunction.ShowOrHideControl(hideControls, moveControls);
- SwitchVersionFunctionInterface.SwitchVersionFunction(EnumVersionFunctionType.VersionFuncionOne).ShowOrHideTabControl(tabControl, hideControls);
- }
- break;
- }
- }
- /// <summary>
- /// 版本模块权限
- /// </summary>
- /// <param name="enumFunction">枚举的数据类型</param>
- public static bool UIFunctionVersion(VersionFunctionEnum enumFunction,bool isMsg=true)
- {
- bool b = true ;
- switch (enumFunction)
- {
- case VersionFunctionEnum.财务管理财务支出:
- case VersionFunctionEnum.决策助手营收分析:
- case VersionFunctionEnum.决策助手订单前期分析:
- case VersionFunctionEnum.决策助手订单后期分析:
- case VersionFunctionEnum.决策助手选片分析:
- case VersionFunctionEnum.决策助手客源分析:
- case VersionFunctionEnum.决策助手接单能力分析:
- case VersionFunctionEnum.决策助手接单套系分析:
- case VersionFunctionEnum.决策助手转介绍分析:
- case VersionFunctionEnum.决策助手员工业绩:
- case VersionFunctionEnum.决策助手年财务支出:
- case VersionFunctionEnum.决策助手财务支出详情:
- case VersionFunctionEnum.决策助手年店面支出:
- case VersionFunctionEnum.决策助手店面支出详情:
- case VersionFunctionEnum.决策助手重拍分析:
- case VersionFunctionEnum.决策助手储值卡分析:
- case VersionFunctionEnum.决策助手景点使用分析:
- case VersionFunctionEnum.全员营销:
- case VersionFunctionEnum.工作统计:
- case VersionFunctionEnum.会员管理摄友会会员:
- case VersionFunctionEnum.客服中心已过预约把控:
- case VersionFunctionEnum.客服中心预约预警提醒:
- case VersionFunctionEnum.客服中心客服安排:
- case VersionFunctionEnum.店务管理请假申请:
- case VersionFunctionEnum.店务管理请假审批:
- case VersionFunctionEnum.店务管理请假申请管理:
- case VersionFunctionEnum.店务管理我的工作汇报:
- case VersionFunctionEnum.店务管理工作审批:
- case VersionFunctionEnum.店务管理工作汇报审批管理:
- case VersionFunctionEnum.通话中心:
- case VersionFunctionEnum.开单礼包功能:
- case VersionFunctionEnum.订单选片加减乘除:
- case VersionFunctionEnum.客户管理意向客户跟踪登记提醒:
- case VersionFunctionEnum.客户管理沟通再次提醒:
-
- case VersionFunctionEnum.员工考勤员工档期:
- case VersionFunctionEnum.App和微信公众号扫码支付:
- case VersionFunctionEnum.打印根据订单类型区分打印:
- case VersionFunctionEnum.库存管理库存采购流程:
- case VersionFunctionEnum.重拍责任人统计明细:
- b = LYFZSS.SystemSpecterPossessed.
- ISystemSpecterPossessed.LargeResolveSystemSpecterPossessed(
- LYFZSS.SystemSpecterType.SST_D);
- break;
- case VersionFunctionEnum.统计查询成本核算:
- case VersionFunctionEnum.统计查询库存报表:
- case VersionFunctionEnum.统计查询满意度报表:
- case VersionFunctionEnum.统计查询订单图表:
- case VersionFunctionEnum.短信管理医院跟踪短信:
- case VersionFunctionEnum.短信管理微信短信推送:
- case VersionFunctionEnum.会员管理服务卡会员:
- case VersionFunctionEnum.礼服管理:
- case VersionFunctionEnum.库存管理手工入库减库:
- case VersionFunctionEnum.库存管理固定资产管理:
- case VersionFunctionEnum.客服中心回访调查近期服务回访:
- case VersionFunctionEnum.店务管理发布任务:
- case VersionFunctionEnum.店务管理我的任务:
- case VersionFunctionEnum.店务管理事项申请:
- case VersionFunctionEnum.店务管理事项审批:
- case VersionFunctionEnum.店务管理事项管理:
- case VersionFunctionEnum.客户管理意向客户:
- case VersionFunctionEnum.来电精灵:
- case VersionFunctionEnum.沟通助手:
- case VersionFunctionEnum.员工考勤考勤管理:
- case VersionFunctionEnum.App和微信公众号微信公众平台绑定自助服务:
- case VersionFunctionEnum.医院跟踪系统意向单录入:
- case VersionFunctionEnum.医院跟踪系统意向单查询:
- case VersionFunctionEnum.医院跟踪系统今日提醒:
- case VersionFunctionEnum.医院跟踪系统跟踪短信:
- case VersionFunctionEnum.医院跟踪系统跟踪记录登记:
- case VersionFunctionEnum.登录我的工作:
- case VersionFunctionEnum.订单数码安排数码安排:
- case VersionFunctionEnum.订单相片冲印:
- case VersionFunctionEnum.订单选片选P:
- case VersionFunctionEnum.库存管理下单预售统计:
- b = LYFZSS.SystemSpecterPossessed.
- ISystemSpecterPossessed.LargeResolveSystemSpecterPossessed(
- LYFZSS.SystemSpecterType.SST_C);
- break;
- }
- if (!b && isMsg)
- {
- MessageBoxCustom.Show("当前版本无 " + enumFunction + " 模块的功能!");
- }
- return b;
- }
- public static void BindSystemGlobalSettings()
- {
- if (!CheckFuntionVersion(VersionFunctionEnum.财务管理证件照))
- {
- LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.OtherConsumerPassportManagement = false;
- }
-
- if(!CheckFuntionVersion(VersionFunctionEnum.开单自动开会员))
- {
- LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.OrderAutoOpenMemberCard = false;
- }
- if (!CheckFuntionVersion(VersionFunctionEnum.订单拍照导片同时计件))
- {
- LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.ImportingPhotoPieceInput = false;
- }
-
- if(LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.ImportingPhotoPieceInput)
- {
- if (!CheckFuntionVersion(VersionFunctionEnum.订单修片导片同时计件))
- {
- LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.ImportingPhotoPieceInput = false;
- }
-
- }
- if (!CheckFuntionVersion(VersionFunctionEnum.开单礼包功能))
- {
- LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.GiftsPacksSetsofLines = false;
- }
- if (!CheckFuntionVersion(VersionFunctionEnum.开单成本管控保利系数))
- {
- LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.EnableOrderCostControlSystem = false;
- }
- if (!CheckFuntionVersion(VersionFunctionEnum.订单选片选P))
- {
- LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.VirtualDesign = false;
- }
-
- }
- static bool CheckFuntionVersion(VersionFunctionEnum enumFunction)
- {
- bool b = true;
- switch (enumFunction)
- {
- case VersionFunctionEnum.财务管理证件照:
- case VersionFunctionEnum.开单自动开会员:
- case VersionFunctionEnum.订单拍照导片同时计件:
- case VersionFunctionEnum.订单修片导片同时计件:
- case VersionFunctionEnum.开单礼包功能:
- b = LYFZSS.SystemSpecterPossessed.
- ISystemSpecterPossessed.LargeResolveSystemSpecterPossessed(
- LYFZSS.SystemSpecterType.SST_D);
- break;
- case VersionFunctionEnum.开单成本管控保利系数:
- case VersionFunctionEnum.订单选片选P:
- b = LYFZSS.SystemSpecterPossessed.
- ISystemSpecterPossessed.LargeResolveSystemSpecterPossessed(
- LYFZSS.SystemSpecterType.SST_C);
- break;
- }
- return b;
- }
- }
- }
|