Example #1
0
        public ActionResult UpdateGroup(int Gid, string Groupname)
        {
            DataAccess.Tnsmtp_Contactgroup tnsmtp_Contactgroup = new DataAccess.Tnsmtp_Contactgroup();

            if (!tnsmtp_Contactgroup.SelecByUserid(SysUser.UserId, Gid))
            {
                return(FailResult("查询失败!"));
            }

            tnsmtp_Contactgroup.Groupname = Groupname;

            if (!tnsmtp_Contactgroup.Update())
            {
                return(FailResult("修改失败!"));
            }
            return(SuccessResult("修改成功"));
        }
Example #2
0
        public ActionResult DeleteGroup(int Gid)
        {
            DataAccess.Tnsmtp_Contactgroup tnsmtp_Contactgroup = new DataAccess.Tnsmtp_Contactgroup();

            if (!tnsmtp_Contactgroup.SelecByUserid(SysUser.UserId, Gid))
            {
                return(FailResult("删除失败!"));
            }

            tnsmtp_Contactgroup.Status = 1;

            if (!tnsmtp_Contactgroup.Update())
            {
                return(FailResult("删除失败!"));
            }
            return(SuccessResult());
        }