Beispiel #1
0
        public bool UpdateFormModuleFunctionRoleLink(string ticket, string _listYnFormModuleFunctionRoleLink, ref string message)
        {
            try
            {
                message = "";
                if (!IsTicketValid(ticket))
                {
                    throw new Exception("票证验证失败!");
                }

                List <YnFormModuleFunctionRoleLink> listYnFormModuleFunctionRoleLink = (List <YnFormModuleFunctionRoleLink>)YnBaseClass2.Helper.ObjectHelper.Deserialize(typeof(List <YnFormModuleFunctionRoleLink>), _listYnFormModuleFunctionRoleLink);
                //ynUser.lastLoginDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                YnFormModuleFunctionRoleLinkService.GetInstance().Update(listYnFormModuleFunctionRoleLink);
                return(true);
            }
            catch (Exception ex)
            {
                message = ex.Message;
            }
            return(false);
        }
Beispiel #2
0
        public string GetFormModuleFunctionRoleLinkByModuleFunctionId(string ticket, int functionId, ref string message)
        {
            try
            {
                message = "";
                if (!IsTicketValid(ticket))
                {
                    throw new Exception("票证验证失败!");
                }

                List <YnFormModuleFunctionRoleLink> listYnFormModuleFunctionRoleLink = YnFormModuleFunctionRoleLinkService.GetInstance().GetListByModuleFunctionId(functionId);
                return(YnBaseClass2.Helper.ObjectHelper.Serialize(listYnFormModuleFunctionRoleLink));
            }
            catch (Exception ex)
            {
                message = ex.Message;
            }
            return(null);
        }
Beispiel #3
0
        public string GetFormModuleFunctionRoleLinkListByRoleId(string ticket, string _listRoleId, ref string message)
        {
            try
            {
                message = "";
                if (!IsTicketValid(ticket))
                {
                    throw new Exception("票证验证失败!");
                }

                List <int> listRoleId = (List <int>)YnBaseClass2.Helper.ObjectHelper.Deserialize(typeof(List <int>), _listRoleId);
                List <YnFormModuleFunctionRoleLink> listYnFormModuleFunctionRoleLink = YnFormModuleFunctionRoleLinkService.GetInstance().GetListByRoleId(listRoleId);
                if (listYnFormModuleFunctionRoleLink != null)
                {
                    return(YnBaseClass2.Helper.ObjectHelper.Serialize(listYnFormModuleFunctionRoleLink));
                }
            }
            catch (Exception ex)
            {
                message = ex.Message;
            }
            return(null);
        }