public IActionResult EditContractPeriod(int id) { var contractPeriod = _period.GetById(id); var model = new AddContractPeriodModel { ContractPeriodId = contractPeriod.Id, Perioada = contractPeriod.Perioada, DataInceput = contractPeriod.DataInceput, DataSfarsit = contractPeriod.DataSfarsit, Contract = contractPeriod.Contract }; return(View("EditContractPeriod", model)); }
public IActionResult AddContractPeriod(int id) { var contract = _contract.GetById(id); var model = new AddContractPeriodModel { ContractId = id, Perioada = "", DataInceput = DateTime.Now, DataSfarsit = DateTime.Now.AddYears(1), Contract = contract }; return(View(model)); }