示例#1
0
        /// <summary>
        /// 代理商状态更新,同时修改关联账号状态,状态枚举相同
        /// </summary>
        /// <param name="sysNo">代理商系统编号</param>
        /// <param name="status">代理商状态</param>
        /// <param name="lastUpdateBy">最后更新人</param>
        /// <remarks> 2016-04-15 刘伟豪 创建 </remarks>
        public override bool UpdateStatus(int sysNo, DistributionStatus.代理商状态 status, int lastUpdateBy)
        {
            int r = Context.Sql("update DsAgent set status=@0,lastupdateby=@1,lastupdatedate=@2 where sysno=@3", (int)status, lastUpdateBy, DateTime.Now, sysNo)
                    .Execute();

            return(r > 0);
        }
示例#2
0
        /// <summary>
        /// 代理商状态更新,同时修改关联账号状态,状态枚举相同
        /// </summary>
        /// <param name="sysNo">代理商系统编号</param>
        /// <param name="status">代理商状态</param>
        /// <param name="lastUpdateBy">最后更新人</param>
        /// <remarks> 2016-04-15 刘伟豪 创建 </remarks>
        public bool UpdateStatus(int sysNo, DistributionStatus.代理商状态 status, int lastUpdateBy)
        {
            bool r = IDsAgentDao.Instance.UpdateStatus(sysNo, status, lastUpdateBy);

            if (r)
            {
                var userSysNo  = GetDsAgent(sysNo).UserSysNo;
                var userStatus = status == DistributionStatus.代理商状态.启用 ? 1 : 0;
                SyUserBo.Instance.UpdateSyUserStatus(userSysNo, userStatus);
                Log.SysLog.Instance.Info(LogStatus.系统日志来源.后台, "修改代理商状态:" + status.ToString(), LogStatus.系统日志目标类型.代理商, sysNo);
            }

            return(r);
        }
示例#3
0
 /// <summary>
 /// 代理商状态更新,同时修改关联账号状态,状态枚举相同
 /// </summary>
 /// <param name="sysNo">代理商系统编号</param>
 /// <param name="status">代理商状态</param>
 /// <param name="lastUpdateBy">最后更新人</param>
 /// <remarks> 2016-04-15 刘伟豪 创建 </remarks>
 public abstract bool UpdateStatus(int sysNo, DistributionStatus.代理商状态 status, int lastUpdateBy);