Example #1
0
        public IActionResult EditContractOrgAssignment(int id)
        {
            var contractOrgAssignment = _contractOrgAssignment.GetById(id);
            var model = new AddContractOrgAssignmentModel
            {
                ContractOrganizatoricalAssignmentId = contractOrgAssignment.Id,
                Departament = contractOrgAssignment.Departament,
                Functie     = contractOrgAssignment.Functie,
                DataInceput = contractOrgAssignment.DataInceput,
                DataSfarsit = contractOrgAssignment.DataSfarsit,
                Contract    = contractOrgAssignment.Contract
            };

            return(View("EditContractOrgAssignment", model));
        }
Example #2
0
        public IActionResult AddContractOrgAssignment(int id)
        {
            var contract = _contract.GetById(id);
            var model    = new AddContractOrgAssignmentModel
            {
                ContractId  = id,
                Departament = "",
                Functie     = "",
                DataInceput = DateTime.Now,
                DataSfarsit = DateTime.Now.AddYears(1),
                Contract    = contract
            };

            return(View(model));
        }