public ActionResult EventsDelete(int id)
        {
            if (Session["UserTicket"] != null)
            {
                DataQueryService.IDataQueryService dataQueryService = new DataQueryService.DataQueryServiceClient();
                EventsModel model = new EventsModel();

                var evnt = dataQueryService.GetEvent(id, new Guid(Session["UserTicket"].ToString()));

                if (evnt != null)
                {
                    model.Id               = evnt.Id;
                    model.date             = DateTime.Parse(evnt.Date);
                    model.notificationDate = DateTime.Parse(evnt.NotificationDate);
                    model.content          = evnt.Content;
                    model.title            = evnt.Title;
                    model.departments      = evnt.Department;
                    model.UserId           = evnt.UserId;

                    return(View(model));
                }
                return(View(model));
            }
            return(Redirect("~/Login/Login"));
        }
        public ActionResult EventsEdit(int id)
        {
            if (Session["UserTicket"] != null)
            {
                DataQueryService.IDataQueryService dataQueryService = new DataQueryService.DataQueryServiceClient();

                var evnt        = dataQueryService.GetEvent(id, new Guid(Session["UserTicket"].ToString()));
                var departments = dataQueryService.GetAllDeansOffices(new Guid(Session["UserTicket"].ToString())); // tu get deparmen

                var model = new EventsModel
                {
                    departmentsList = departments.Select(d => new SelectListItem
                    {
                        Text  = d.Department.Name,
                        Value = d.Id.ToString()
                    })
                };

                model.Id                   = evnt.Id;
                model.content              = evnt.Content;
                model.title                = evnt.Title;
                model.date                 = DateTime.Parse(evnt.Date);
                model.notificationDate     = DateTime.Parse(evnt.NotificationDate);
                model.selectedDepartmentId = evnt.Department.Id;
                model.UserId               = evnt.UserId;

                return(View(model));
            }
            return(Redirect("~/Login/Login"));
        }