コード例 #1
0
        public IActionResult LocalServicoAddEdit(int?idLocalServico)
        {
            if (idLocalServico != null)
            {
                var localServico = _localServicoRepository.GetByID(idLocalServico ?? 0);

                var localServicoVM = new LocalServicoVM()
                {
                    IDLocal     = localServico.IDLocal,
                    Nome        = localServico.Nome,
                    CEP         = localServico.CEP,
                    Endereco    = localServico.Endereco,
                    Numero      = localServico.Numero,
                    Complemento = localServico.Complemento,
                    Bairro      = localServico.Bairro,
                    Cidade      = localServico.Cidade,
                    UF          = localServico.UF,
                    NomeContato = localServico.NomeContato,
                    Telefone    = localServico.Telefone,
                    WhatsApp    = localServico.WhatsApp,
                    Observacao  = localServico.Observacao
                };

                return(View(localServicoVM));
            }

            return(View());
        }
コード例 #2
0
        public IActionResult LocalServicoCreateOrUpdate(LocalServicoVM localServicoVM)
        {
            _localServicoBU.Save
            (
                localServicoVM.IDLocal,
                idCompany,
                idUser,
                localServicoVM.Nome,
                localServicoVM.CEP,
                localServicoVM.Endereco,
                localServicoVM.Numero,
                localServicoVM.Complemento,
                localServicoVM.Bairro,
                localServicoVM.Cidade,
                localServicoVM.UF,
                localServicoVM.NomeContato,
                localServicoVM.Telefone,
                localServicoVM.WhatsApp,
                localServicoVM.Observacao
            );

            return(Ok());
        }