Exemplo n.º 1
0
        public ActionResult ExtensionExecutionConfirm(ExtensionExecution execution)
        {
            Document document = db.Documents.Find(execution.DocumentId);

            document.ExecutionDate = execution.ExecutionDate;
            db.ExtensionExecutions.Add(execution);

            db.SaveChanges();
            return(Content(bool.TrueString));
        }
Exemplo n.º 2
0
        public ActionResult ExtensionExecution(Guid id)
        {
            Document document = db.Documents.Find(id);

            PW.Ncels.Database.DataModel.ExtensionExecution execution = new ExtensionExecution();
            execution.Id         = Guid.NewGuid();
            execution.Date       = document.DocumentDate.HasValue ? document.DocumentDate.Value : DateTime.Now;
            execution.Number     = document.Number;
            execution.DocumentId = document.Id;

            return(PartialView(execution));
        }