Ejemplo n.º 1
0
        public async Task <ActionResult> EditGroup(EditGroupModel model, string button)
        {
            if (ModelState.IsValid)
            {
                model.UserEdit = User.Identity.Name;
                model.Group    = true;
                if (button == "Extra")
                {
                    model.ExtraSend = true;
                }
                else
                {
                    model.ExtraSend = false;
                }

                var group  = mapper.Map <EditGroupModel, GroupVisitorDTO>(model);
                var result = await _groupService.Update(group);

                if (result.Succedeed)
                {
                    return(RedirectToAction("Index"));
                }
                else
                {
                    ModelState.AddModelError("", result.Message);
                }
            }

            ViewBag.Genders       = Gender();
            ViewBag.CheckPoints   = CheckPoints();
            ViewBag.Nationalities = Nationalities();
            return(View(model));
        }
Ejemplo n.º 2
0
        public IActionResult EditGroup(int groupId, int createNewInt)
        {
            bool createNew = createNewInt > 0;

            EditGroupModel m = new EditGroupModel()
            {
                UserId    = UserInfoManager.UserId,
                GroupId   = groupId,
                CreateNew = createNew,
                Colors    = Utils.Utils.GetColors(),
            };

            if (createNew || groupId == -1)
            {
                m.Group = new UnitGroupWithSpecificationModel()
                {
                    Id      = -1,
                    UserId  = UserInfoManager.UserId,
                    Name    = "Výzkumné středisko CERN",
                    ColorId = 7,
                    Note    = "Hadronový urychlovač částic a další věci",
                    State   = "state",
                    City    = "city",
                    Street  = "street",
                    Number  = "number",
                    Zip     = "zip",
                };
            }
            else
            {
                m.Group = Utils.Utils.GetUnitGroupById(groupId);
            }

            return(View(m));
        }
Ejemplo n.º 3
0
        public IActionResult EditGroup(int id)
        {
            var model = new EditGroupModel();

            model.Load(id);
            return(View(model));
        }
Ejemplo n.º 4
0
 public IActionResult EditGroup(
     [Bind(
          nameof(EditGroupModel.Id),
          nameof(EditGroupModel.GroupName))] EditGroupModel model)
 {
     if (ModelState.IsValid)
     {
         try
         {
             model.Edit();
             model.Response = new ResponseModel("Group configuration editing successful.", ResponseType.Success);
             return(RedirectToAction("Index"));
         }
         catch (DuplicationException ex)
         {
             model.Response = new ResponseModel(ex.Message, ResponseType.Failure);
             // error logger code
         }
         catch (Exception ex)
         {
             model.Response = new ResponseModel("Group configuration creation failued.", ResponseType.Failure);
             // error logger code
         }
     }
     return(View(model));
 }
Ejemplo n.º 5
0
        private async Task <GroupVisitorDTO> EditGroup(EditGroupModel group, params EditInfoVisitorModel[] visitors)
        {
            var findGroup   = groupService.GetAll().LastOrDefault();
            var oldVisitors = findGroup.Visitors.OrderBy(v => v.Id).ToList();

            int i = 0;

            foreach (var visitor in visitors)
            {
                if (i < oldVisitors.Count)
                {
                    visitor.Id = oldVisitors[i++].Id;
                }
                else
                {
                    break;
                }
            }
            group.Infoes = visitors;
            group.Id     = findGroup.Id;

            var result = (await anketaController.EditGroup(group, "Extra")) as RedirectToRouteResult;

            if (result == null)
            {
                return(null);
            }
            var groupResult = groupService.GetById(group.Id);

            return(groupResult);
        }
Ejemplo n.º 6
0
        public async Task <HttpResponseMessage> UpdateGroup([FromUri] int id, [FromBody] EditGroupModel model)
        {
            Log.Out.BeginInfo(model.ToJson(), "UpdateGroup - Id: {0}", id);
            model.ModifiedBy = UserHelper.GetId();
            await Service.Get <ISystemService>().UpdateGroup(id, model);

            Log.Out.EndInfo("UpdateGroup - Id: {0}", id);
            return(Request.CreateResponse(HttpStatusCode.OK));
        }
Ejemplo n.º 7
0
        public ActionResult Edit(int id)
        {
            GroupeRepository Gr = new GroupeRepository(ConfigurationManager.ConnectionStrings["CnstrDev"].ConnectionString);
            Groupe           G  = Gr.GetOne(id); //Entity
            EditGroupModel   Gm = MapToDBModel.GroupToEditGroupModel(G);

            ViewBag.Current = "Groupe";
            return(View(Gm));
        }
Ejemplo n.º 8
0
        public async Task EditGroupAsync(EditGroupModel model)
        {
            var group = await _groupRepository.GetGroupAsync(model.id);

            group.avatarLink  = model.avatarLink;
            group.name        = model.name;
            group.description = model.description;
            await _groupRepository.UpdateGroup(group);
        }
Ejemplo n.º 9
0
        public async Task <GroupModel> EditGroup(long groupId, [FromBody] EditGroupModel model)
        {
            model.UserId = CurrentUserId;

            model.Id = groupId;

            var result = await groupLib.EditGroupAsync(model);

            return(result);
        }
Ejemplo n.º 10
0
        public ActionResult EditGroupIf(string name)
        {
            interfaceOperation = true;
            var group         = groupsApi.FindGroupByName(name);
            var modifiedGroup = new EditGroupModel {
                Name = group.Name, NewName = group.Name, Creator = group.Creator, Description = group.Description, NewDescription = group.Description
            };

            return(View(modifiedGroup));
        }
Ejemplo n.º 11
0
        public ActionResult EditGroup(int groupId)
        {
            var currentUser = idb.Users.Find(User.Identity.GetUserId());

            if (!repository.IsGroupCreator(groupId, currentUser.Id))
            {
                return(RedirectToAction("Index", "Group"));
            }
            else
            {
                CultureHelper _CultureHelper = new CultureHelper(repository);
                TimeZoneInfo  TZone          = _CultureHelper.GetTimeZoneInfo(currentUser.LocationID);
                DateTime      LocalNow       = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, TZone);
                Group         CurrentGroup   = repository.GetGroupByID(groupId);

                EditGroupModel _EditGroupModel = new EditGroupModel
                {
                    AverageSpeed  = CurrentGroup.AverageSpeed,
                    GroupId       = groupId,
                    Hour          = CurrentGroup.RideHour,
                    Minute        = CurrentGroup.RideMinute,
                    LocationsId   = CurrentGroup.Location.id,
                    Name          = CurrentGroup.name,
                    StartLocation = CurrentGroup.StartLocation,
                    Locations     = repository.GetLocations().ToList(),
                    MapUrl        = CurrentGroup.MapUrl,
                    IsPrivate     = CurrentGroup.IsPrivate,
                    Description   = CurrentGroup.Description,
                    CreatorName   = CurrentGroup.CreatedByName,
                    IsOneOff      = CurrentGroup.OneOff,
                    Date          = CurrentGroup.RideDate,
                    Day           = CurrentGroup.RideDate.Day,
                    Month         = CurrentGroup.RideDate.Month,
                    Year          = CurrentGroup.RideDate.Year
                };

                _EditGroupModel.Routes = repository.GetRoutesByGroupId(groupId);

                _EditGroupModel.LocationsId = repository.GetLocations()
                                              .Where(l => l.id == CurrentGroup.Location.id).Select(t => t.id).FirstOrDefault();

                foreach (DayOfWeekViewModel ditem in _EditGroupModel.DaysOfWeek)
                {
                    foreach (CycleDays item in CurrentGroup.RideDays)
                    {
                        if (ditem.Name == item.DayOfWeek)
                        {
                            ditem.Checked = true;
                        }
                    }
                }
                return(View(_EditGroupModel));
            }
        }
Ejemplo n.º 12
0
 public Task UpdateGroup(int id, EditGroupModel model)
 {
     return(Update <Group, IGroupRepository>(id, group =>
     {
         var entity = model.GetEntity();
         group.Name = entity.Name;
         group.Description = entity.Description;
         group.ModifiedByUserId = entity.ModifiedByUserId;
         group.ModificationTime = DateTime.UtcNow;
     }));
 }
Ejemplo n.º 13
0
        public async Task <HttpResponseMessage> AddGroup([FromBody] EditGroupModel model)
        {
            Log.Out.BeginInfo(model.ToJson(), "AddGroup");
            int userId = UserHelper.GetId();

            model.CreatedBy  = userId;
            model.ModifiedBy = userId;
            var id = await Service.Get <ISystemService>().AddGroup(model);

            Log.Out.EndInfo("AddGroup - Id: {0}", id);
            return(Request.CreateResponse(HttpStatusCode.OK, new { Id = id }));
        }
Ejemplo n.º 14
0
        public ActionResult Edit([FromBody] EditGroupModel group)
        {
            List <System.Security.Claims.Claim> c = User.Claims.Where(x => x.Type.Contains("mail")).ToList();
            string email = c[0].Value;
            int    id    = context.GetUserId(email);

            group.OldGroupId = int.Parse(group.OldIdStr);
            System.ComponentModel.DataAnnotations.ValidationResult result = group.Validate(context, id, email);
            if (result != System.ComponentModel.DataAnnotations.ValidationResult.Success)
            {
                return(Json(new { success = false, msg = result.ErrorMessage }));
            }
            EditGroupInServer(group, id, email);
            return(Json(new { success = true, msg = "Group has been successfully saved!" }));
        }
        public ActionResult Edit(EditGroupModel editGroupModel)
        {
            if (ModelState.IsValid)
            {
                Group group = db.Groups
                              //.Include(g => g.StudyPrograms)
                              .Where(g => g.CourseCode == editGroupModel.CourseCode).First();

                group.CourseName        = editGroupModel.CourseName;
                group.CourseDescription = editGroupModel.CourseDescription;
                db.Entry(group).State   = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }
            return(View(editGroupModel));
        }
Ejemplo n.º 16
0
        public ActionResult <GroupModel> EditGroupByIf(EditGroupModel groupModel)
        {
            interfaceOperation = true;
            var group      = groupsApi.FindGroupByName(groupModel.Name);
            var permission = permissionsApi.GetPermissionForUserByGroup(groupModel.Creator, group.Id);

            if (permission == null)
            {
                return(RedirectToAction(nameof(MessagePage), new { message = "No information about permission for this group!" }));
            }
            if (permission.Operation != Operation.Admin)
            {
                return(RedirectToAction(nameof(MessagePage), new { message = "No permission!" }));
            }
            var result = groupsApi.EditGroup(groupModel.Name, groupModel.NewName, groupModel.NewDescription);

            return(RedirectToAction(nameof(GetAllGroupsByIf)));
        }
        public HttpResponseMessage EditGroup([FromBody] EditGroupModel editGroupModel)
        {
            Group group = groupRepository.GetById(editGroupModel.Id);

            if (group == null)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Group with id = " + editGroupModel.Id.ToString() + "not found"));
            }
            else
            {
                group.Name         = editGroupModel.Name;
                group.SectionId    = editGroupModel.SectionId;
                group.IsIntroGroup = editGroupModel.IsIntroGroup;

                groupRepository.SaveChanges(group);
                return(Request.CreateResponse(HttpStatusCode.OK));
            }
        }
Ejemplo n.º 18
0
        public IActionResult EditGroup(int id)
        {
            List <System.Security.Claims.Claim> c = User.Claims.Where(x => x.Type.Contains("mail")).ToList();
            string email = c[0].Value;
            int    Uid   = context.GetUserId(email);

            Group group = context.Groups.FirstOrDefault(g => g.OwnerId == Uid && g.Id == id);

            if (group == null)
            {
                throw new ArgumentException();
            }

            group.Members = context.GroupMembers.Where(gm => gm.GroupId == group.Id).ToList();
            HashSet <string> emails = new HashSet <string>();

            foreach (var gm in group.Members)
            {
                emails.Add(context.GetUserEmail(gm.UserId));
            }

            EditGroupModel model = new EditGroupModel();

            model.OldGroupId = id;
            model.GroupName  = group.GroupName;
            StringBuilder stringBuilder = new StringBuilder();

            foreach (string s in emails)
            {
                stringBuilder.Append(s);
                stringBuilder.Append(";");
            }

            //oldAdress = set;

            model.Emails = stringBuilder.ToString();

            model.Addresses = new HashSet <string>();

            return(View(model));
        }
Ejemplo n.º 19
0
        public async Task <IActionResult> EditGroup(int groupId, int createNewInt)
        {
            if (!await CanUserVisitPage(groupId))
            {
                return(RedirectToAction("AccessError", "Home"));
            }

            var createNew = createNewInt > 0;

            var m = new EditGroupModel
            {
                UserId    = UserInfoManager.UserId,
                GroupId   = groupId,
                CreateNew = createNew,
                Colors    = Utils.Utils.GetColors()
            };

            if (createNew || groupId == -1)
            {
                m.Group = new UnitGroupWithSpecificationModel
                {
                    Id      = -1,
                    UserId  = UserInfoManager.UserId,
                    Name    = "Výzkumné středisko CERN",
                    ColorId = 7,
                    Note    = "Hadronový urychlovač částic a další věci",
                    State   = "state",
                    City    = "city",
                    Street  = "street",
                    Number  = "number",
                    Zip     = "zip"
                }
            }
            ;
            else
            {
                m.Group = Utils.Utils.GetUnitGroupById(groupId);
            }

            return(View(m));
        }
        public ActionResult Edit(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Group group = db.Groups.Where(g => g.CourseCode == id).FirstOrDefault();

            if (group == null)
            {
                return(HttpNotFound());
            }

            var model = new EditGroupModel()
            {
                CourseCode        = group.CourseCode,
                CourseName        = group.CourseName,
                CourseDescription = group.CourseDescription
            };

            return(View(model));
        }
Ejemplo n.º 21
0
        public async Task <GroupModel> EditGroupAsync(EditGroupModel model)
        {
            var entity = await groupRepo.FirstAsync(x => x.Id == model.Id);

            if (entity == null)
            {
                throw new System.Exception("Group Not Exist");
            }

            if (entity.UserId != model.UserId)
            {
                throw new System.Exception("User Doesn't Owner Of Group");
            }

            entity.Name = model.Name;

            groupRepo.Update(entity);

            await unitOfWork.CommitAsync();

            return(ConverGroupToGroupModel(entity));
        }
Ejemplo n.º 22
0
        public static EditGroupModel GroupToEditGroupModel(Groupe g)
        {
            EditGroupModel Em = new EditGroupModel();

            Em.MonGroupe = new GroupModel()
            {
                IdGroupe    = g.IdGroupe,
                Description = g.Description,
                Nom         = g.Nom
            };
            EvenementRepository er = new EvenementRepository(ConfigurationManager.ConnectionStrings["CnstrDev"].ConnectionString);

            List <Evenement> ev = er.GetAll().ToList();

            Em.MesEvents = new List <EventModel>();
            //Mapping
            foreach (Evenement item in ev)
            {
                Em.MesEvents.Add(MapToDBModel.EvenementToEventModel(item));
            }
            return(Em);
        }
Ejemplo n.º 23
0
        protected bool EditGroupInServer(EditGroupModel group, int id, string email)
        {
            Group gr = new Group();

            gr.OwnerId   = id;
            gr.GroupName = group.GroupName;
            //gr.Id = context.Groups.Max<Group>(gr => gr.Id) + 1;
            gr.Members = null;

            Group gToDelate = context.Groups.Where(g => g.Id == group.OldGroupId).FirstOrDefault();

            context.Groups.Remove(gToDelate);
            context.GroupMembers.RemoveRange(context.GroupMembers.Where(g => g.GroupId == group.OldGroupId));
            context.SaveChanges();

            context.Groups.Add(gr);
            context.SaveChanges();

            gr.Members = Models.EditGroupModel.GroupManagerParams(context, gr, id, email, group.Addresses);
            context.SaveChanges();

            return(true);
        }
Ejemplo n.º 24
0
        public async Task <IActionResult> EditGroupAsync([FromBody] EditGroupModel model)
        {
            await _groupService.EditGroupAsync(model);

            return(Ok());
        }
Ejemplo n.º 25
0
 public EditGroupPage(Group gr)
 {
     InitializeComponent();
     BindingContext = new EditGroupModel(gr);
     Title          = "Edytuj Dane";
 }
Ejemplo n.º 26
0
        public ActionResult EditGroup(EditGroupModel _EditGroupModel)
        {
            var currentUser             = idb.Users.Find(User.Identity.GetUserId());
            List <CycleDays> _CycleDays = new List <CycleDays>();
            Location         _Location  = repository.GetLocations()
                                          .Where(l => l.id == _EditGroupModel.LocationsId).FirstOrDefault();
            CultureHelper _CultureHelper = new CultureHelper(repository);
            TimeZoneInfo  TZone          = _CultureHelper.GetTimeZoneInfo(currentUser.LocationID);
            DateTime      LocalNow       = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, TZone);
            Group         CurrentGroup   = repository.GetGroupByID(_EditGroupModel.GroupId);

            if (!CurrentGroup.OneOff)
            {
                foreach (DayOfWeekViewModel item in _EditGroupModel.DaysOfWeek)
                {
                    if (item.Checked)
                    {
                        CycleDays NewDay = new CycleDays {
                            DayOfWeek = item.Name
                        };
                        _CycleDays.Add(NewDay);
                    }
                }

                Group UpdatedGroup = new Group
                {
                    name              = _EditGroupModel.Name,
                    RideTime          = _EditGroupModel.Hour.ToString() + ":" + _EditGroupModel.Minute.ToString(),
                    RideDays          = _CycleDays,
                    Location          = _Location,
                    Rides             = new List <Ride>(),
                    AverageSpeed      = _EditGroupModel.AverageSpeed,
                    StartLocation     = _EditGroupModel.StartLocation,
                    RideHour          = _EditGroupModel.Hour,
                    RideMinute        = _EditGroupModel.Minute,
                    CreatedBy         = CurrentGroup.CreatedBy,
                    CreatedTimeStamp  = CurrentGroup.CreatedTimeStamp,
                    ModifiedTimeStamp = LocalNow,
                    MapUrl            = _EditGroupModel.MapUrl,
                    Description       = _EditGroupModel.Description,
                    id            = _EditGroupModel.GroupId,
                    IsPrivate     = _EditGroupModel.IsPrivate,
                    CreatedByName = _EditGroupModel.CreatorName,
                    OneOff        = _EditGroupModel.IsOneOff,
                    Routes        = _EditGroupModel.Routes
                };

                repository.UpdateGroup(UpdatedGroup);
                repository.Save();
                repository.UpdateRideTimes(UpdatedGroup, TZone);
                repository.Save();
            }
            else
            {
                Group UpdatedGroup = new Group
                {
                    name              = _EditGroupModel.Name,
                    RideTime          = _EditGroupModel.Hour.ToString() + ":" + _EditGroupModel.Minute.ToString(),
                    Location          = _Location,
                    AverageSpeed      = _EditGroupModel.AverageSpeed,
                    StartLocation     = _EditGroupModel.StartLocation,
                    RideHour          = _EditGroupModel.Hour,
                    RideMinute        = _EditGroupModel.Minute,
                    CreatedBy         = CurrentGroup.CreatedBy,
                    CreatedTimeStamp  = CurrentGroup.CreatedTimeStamp,
                    ModifiedTimeStamp = LocalNow,
                    MapUrl            = _EditGroupModel.MapUrl,
                    Description       = _EditGroupModel.Description,
                    id            = _EditGroupModel.GroupId,
                    IsPrivate     = _EditGroupModel.IsPrivate,
                    CreatedByName = _EditGroupModel.CreatorName,
                    OneOff        = _EditGroupModel.IsOneOff,
                    Routes        = _EditGroupModel.Routes
                };

                string   datestring = _EditGroupModel.Day.ToString("00") + "/" + _EditGroupModel.Month.ToString() + "/" + _EditGroupModel.Year.ToString() + " " + _EditGroupModel.Hour.ToString("00") + ":" + _EditGroupModel.Minute.ToString("00");
                DateTime da         = DateTime.ParseExact(datestring, "dd/MM/yyyy HH:mm", null);
                UpdatedGroup.RideDate = da;
                Ride RideToUpdate = repository.GetOneOffRideByGroupID(_EditGroupModel.GroupId);
                RideToUpdate.RideDate = da;

                repository.UpdateGroup(UpdatedGroup);
                repository.Save();
                repository.UpdateRideTimes(UpdatedGroup, TZone);
                repository.Save();
            }

            //Not needed if not able to change days would need to do some work here if allowed.
            //NewGroup = repository.PopulateRideDates(NewGroup);
            //repository.Save();

            return(RedirectToAction("Index", "Group"));
        }
Ejemplo n.º 27
0
 public Task <int> AddGroup(EditGroupModel model)
 {
     return(Add <Group, IGroupRepository>(group => group.Id, model.GetEntity));
 }
Ejemplo n.º 28
0
        private void InitModel()
        {
            visitor1 = new InfoVisitorModel
            {
                Id              = 111,
                Surname         = "surname1",
                Name            = "name1",
                SerialAndNumber = "test 1",
                Gender          = "Мужчина",
                BithDate        = new DateTime(1987, 5, 1),
                Nationality     = "nat1",
                DateInSystem    = DateTime.Now,
                UserInSystem    = "Test"
            };

            visitor2 = new InfoVisitorModel
            {
                Id              = 222,
                Surname         = "surname2",
                Name            = "name2",
                SerialAndNumber = "test 2",
                Gender          = "Мужчина",
                BithDate        = new DateTime(1990, 6, 5),
                Nationality     = "nat2",
                DateInSystem    = DateTime.Now,
                UserInSystem    = "Test"
            };

            createVisitor = new CreateVisitorModel
            {
                Id               = 111,
                Info             = visitor1,
                DateArrival      = DateTime.Now,
                DateDeparture    = DateTime.Now,
                DaysOfStay       = 1,
                CheckPoint       = "Check1",
                PlaceOfRecidense = "place",
                ProgramOfTravel  = "program of travel",
                TimeOfWork       = "time work",
                SiteOfOperator   = "site",
                TelNumber        = "tel",
                Email            = "*****@*****.**",
                DateInSystem     = DateTime.Now,
                UserInSystem     = "Test",
            };

            createGroup = new CreateGroupModel
            {
                Id     = 222,
                Infoes = new List <InfoVisitorModel> {
                    visitor1, visitor2
                },
                DateArrival      = DateTime.Now,
                DateDeparture    = DateTime.Now,
                DaysOfStay       = 1,
                CheckPoint       = "Check1",
                PlaceOfRecidense = "place",
                ProgramOfTravel  = "program of travel",
                OrganizeForm     = "organize form",
                Name             = "name",
                NumberOfContract = "number of contract 123",
                DateOfContract   = new DateTime(2018, 1, 3),
                DateInSystem     = DateTime.Now,
                UserInSystem     = "Test"
            };

            editInfo1 = new EditInfoVisitorModel
            {
                Id              = 1,
                Surname         = "surname1 new",
                Name            = "name1 new",
                SerialAndNumber = "test 1 new",
                Gender          = "Мужчина",
                BithDate        = new DateTime(1987, 5, 1),
                Nationality     = "nat1",
                DateInSystem    = DateTime.Now,
                UserInSystem    = "Test",
                DateEdit        = DateTime.Now,
                UserEdit        = "Test edit"
            };

            editInfo2 = new EditInfoVisitorModel
            {
                Id              = 2,
                Surname         = "surname2 new",
                Name            = "name2 new",
                SerialAndNumber = "test 2 new",
                Gender          = "Мужчина",
                BithDate        = new DateTime(2000, 5, 1),
                Nationality     = "nat1",
                DateInSystem    = DateTime.Now,
                UserInSystem    = "Test",
                DateEdit        = DateTime.Now,
                UserEdit        = "Test 2 edit"
            };

            editVisitor = new EditVisitorModel
            {
                Id               = 2,
                Info             = editInfo1,
                DateArrival      = DateTime.Now,
                DateDeparture    = DateTime.Now,
                DaysOfStay       = 1,
                CheckPoint       = "Check1 new",
                PlaceOfRecidense = "place new",
                ProgramOfTravel  = "program of travel",
                TimeOfWork       = "time work",
                SiteOfOperator   = "site",
                TelNumber        = "tel",
                Email            = "*****@*****.**",
                DateInSystem     = DateTime.Now,
                UserInSystem     = "Test new",
                DateEdit         = new DateTime(2018, 1, 1),
                UserEdit         = "Test edit",
                TranscriptUser   = "******"
            };

            editGroup = new EditGroupModel
            {
                Id     = 1,
                Infoes = new List <EditInfoVisitorModel> {
                    editInfo1, editInfo2
                },
                DateArrival      = DateTime.Now,
                DateDeparture    = DateTime.Now,
                DaysOfStay       = 1,
                CheckPoint       = "Check1 new",
                PlaceOfRecidense = "place new",
                ProgramOfTravel  = "program of travel",
                OrganizeForm     = "organize form",
                Name             = "name new",
                NumberOfContract = "number of contract 123",
                DateOfContract   = new DateTime(2018, 1, 3),
                TranscriptUser   = "******",
                DateInSystem     = DateTime.Now,
                UserInSystem     = "Test",
                DateEdit         = new DateTime(2018, 1, 1),
                UserEdit         = "test edit"
            };
        }