public ActionResult Edit_Score()
        {
            if (Session["CurrentAccountID"] == null)
            {
                return(RedirectToAction("Select", "OfficialAccount", new { Area = "Admin" }));
            }
            Guid            id  = Guid.Parse(Session["CurrentAccountID"].ToString());
            OfficialAccount off = new OfficialAccount_BLL().Get(a => a.AccountID == id);


            AutoMapper.Mapper.CreateMap <OfficialAccount, OfficialAccount_Score_ViewModel>();
            OfficialAccount_Score_ViewModel model = AutoMapper.Mapper.Map <OfficialAccount_Score_ViewModel>(off);

            return(View(model));
        }
        public ActionResult Edit_Score(OfficialAccount_Score_ViewModel model)
        {
            OfficialAccount_BLL bll      = new OfficialAccount_BLL();
            OfficialAccount     newmodel = bll.Get(a => a.AccountID == model.AccountID);

            newmodel.SubscribeAddScore            = model.SubscribeAddScore;
            newmodel.UnSubscribeReduceScore       = model.UnSubscribeReduceScore;
            newmodel.SubscribeParentAddScore      = model.SubscribeParentAddScore;
            newmodel.UnSubscribeParentReduceScore = model.UnSubscribeParentReduceScore;
            newmodel.SignAddScore = model.SignAddScore;



            if (bll.Update(newmodel) > 0)
            {
                return(RedirectToAction("Edit_Score"));
            }
            else
            {
                ModelState.AddModelError("", "修改失败,请稍后再试!");

                return(View(model));
            }
        }