Exemple #1
0
        public ActionResult DeleteYTMembers(Guid YTMemberid, int p)
        {
            YTMembers ytmember = ytmembersService.GetByID(YTMemberid);

            ytmember.Isenable = 0;
            ytmembersService.SpecificUpdate(ytmember, new string[] { "Isenable" });
            ytmembersService.SaveChanges();
            return(RedirectToAction("YTMembers"));
        }
        /*** 批量刪除YT會員 ****/
        public JsonResult AjaxDeleteYTMembersChecked(Guid[] YTMemberid)
        {
            if (YTMemberid != null)
            {
                foreach (Guid thismemberid in YTMemberid)
                {
                    YTMembers ytmember = ytmembersService.GetByID(thismemberid);
                    ytmember.Isenable = 0;
                    ytmembersService.SpecificUpdate(ytmember, new string[] { "Isenable" });
                }
                ytmembersService.SaveChanges();
            }

            return(this.Json("Success"));
        }