Пример #1
0
        public virtual ActionResult EditCasino(AdministrativeDivision city, Casino casino, EditCasinoFormViewModel form)
        {
            return Handle(() =>
                              {
                                  if (!SecurityUser.HasRight(RightType.EditCasino, city))
                                      throw new SecurityAccessDeniedException();

                                  casino.Address = form.Address;
                                  casino.Title = form.Title;

                                  _documentSession.Store(casino);
                              },
                              success: () => Actions.GetCasino(city, casino));
        }
Пример #2
0
 public EditCasinoViewModel(CivilDoIt.Data.Model.Casino casino)
 {
     Casino = casino;
     Form = new EditCasinoFormViewModel(casino.Address, casino.Title);
 }