Exemplo n.º 1
0
        public string DelSysEnum(string id)
        {
            string errorMsg = string.Empty;

            try
            {
                if (!HttpContext.Current.User.IsInRole("Administrators"))
                {
                    return(MC.Role_InvalidError);
                }

                if (string.IsNullOrWhiteSpace(id))
                {
                    return(MC.Submit_InvalidRow);
                }
                Guid gId = Guid.Empty;
                Guid.TryParse(id, out gId);
                if (gId.Equals(Guid.Empty))
                {
                    return(MC.GetString(MC.Submit_Params_GetInvalidRegex, "对应标识值"));
                }

                SysEnum bll = new SysEnum();

                bll.Delete(gId);

                return("1");
            }
            catch (Exception ex)
            {
                errorMsg = ex.Message;
            }

            return(MC.GetString(MC.Submit_Ex_Error, errorMsg));
        }
Exemplo n.º 2
0
        public string DelSysEnum(string id)
        {
            if (string.IsNullOrWhiteSpace(id))
            {
                return(MessageContent.Submit_InvalidRow);
            }
            Guid gId = Guid.Empty;

            Guid.TryParse(id, out gId);
            if (gId.Equals(Guid.Empty))
            {
                return(MessageContent.GetString(MessageContent.Submit_Params_GetInvalidRegex, "对应标识值"));
            }
            SysEnum bll = new SysEnum();

            bll.Delete(gId);
            return("1");
        }