Ejemplo n.º 1
0
        /// <summary>
        /// 删除一个权限
        /// </summary>
        /// <param name="rightID"></param>
        /// <returns></returns>
        public string DeleteRight(string rightID)
        {
            try
            {
                UserDbContext uc = new UserDbContext("ConnStr1");

                Rights data = new Rights();
                data.RightID = rightID;

                uc.DeleteRight(data);
                uc.SaveChanges();

                //string script = MvcUT.ShowAlertAndHref(this, "增加成功", "AddRight");
                return("ok;删除成功");
            }
            catch (Exception ex)
            {
                //提示错误信息
                string str = MisBase.BaseUT.GetRootException(ex).Message;

                return("false;" + str);
            }
        }