Esempio n. 1
0
        private void RefreshEventList(int dossierId)
        {
            Controller.PlanningController           planningController = new PlanningController(null);
            List <Tripple <string, DateTime, int> > events             = planningController.GetEvents(dossierId);

            this.overviewForm.DisplayEvents(events);
        }
Esempio n. 2
0
        public int GetEvent(int id, out int dossierId, out string description, out int responsible, out DateTime deadline, out DateTime?completionDate, out DateTime creationDate)
        {
            PlanningController planningController = new PlanningController(null);

            int result = planningController.GetEvent(id, out dossierId, out description, out responsible, out deadline, out completionDate, out creationDate);

            return(result);
        }
Esempio n. 3
0
        public int RemoveEvent(int id, int dossierId)
        {
            PlanningController planningController = new PlanningController(null);
            int result = planningController.RemoveEvent(id);

            if (result > 0)
            {
                this.RefreshEventList(dossierId);
            }

            return(result);
        }
Esempio n. 4
0
        public int AddEvent(int dossierId, string description, int responsible, DateTime deadline, DateTime?completationDate)
        {
            PlanningController planningController = new PlanningController(null);
            int result = planningController.AddEvent(dossierId, description, responsible, deadline, completationDate);

            if (result > 0)
            {
                this.RefreshEventList(dossierId);
            }

            return(result);
        }
Esempio n. 5
0
        public void ShowWithID(int id)
        {
            Dossier dossier = null;

            using (Database.DossierContext dossierContext = new Database.DossierContext())
            {
                dossier = dossierContext.Dossiers.SingleOrDefault(c => c.Id == id);
            }

            if (dossier != null)
            {
                Controller.PersonController personController = new Controller.PersonController(id);

                List <Tuple <string, int> > contactpersonen = personController.GetNameTuples();
                string procedure          = Automat.Rules.DossierRules.GetProcedureName(dossier.DossierProcedure);
                string type               = Rules.DossierRules.GetProcedureTypeName(dossier.DossierType, true);
                string procuringEnityName = Rules.DossierRules.GetProcuringEntityName(dossier.ProcuringEnity);
                string contractTypeName   = Rules.DossierRules.GetContractTypeName(dossier.TypeOfContract);

                Controller.PlanningController           planningController = new PlanningController(null);
                List <Tripple <string, DateTime, int> > events             = planningController.GetEvents(id);

                this.DossierId = id;

                this.overviewForm.Setdossier(
                    dossier.Id,
                    dossier.DossierNummer,
                    dossier.DossierTitel,
                    dossier.DossierStandvanzaken,
                    dossier.IsGearchiveerd,
                    contactpersonen,
                    dossier.DossierLinkToFiles,
                    procedure,
                    type,
                    dossier.IsEuropeanPublished,
                    procuringEnityName,
                    contractTypeName,
                    events,
                    dossier.RowVersion);
            }
        }
Esempio n. 6
0
 public void ShowPlanningForm()
 {
     Controller.PlanningController planningController = new PlanningController(null);
     planningController.ShowView();
 }