Пример #1
0
        private void UpdateForm()
        {
            var enterprise = _enterpriseRepository.GetById(idEnterprise);

            if (enterprise != null)
            {
                formStatus.InnerText      = "Editar Empresa";
                txtStreetAdress.Text      = enterprise.StreetAdress;
                txtCity.Text              = enterprise.City;
                txtState.Text             = enterprise.State;
                txtZipCode.Text           = enterprise.ZipCode;
                txtCorporateActivity.Text = enterprise.CorporateActivity;
            }
        }
Пример #2
0
        protected void grdRelationships_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType != DataControlRowType.DataRow)
            {
                return;
            }

            var relationship = e.Row.DataItem as Entities.Relationship;

            var usuario    = _userRepository.GetById(relationship.IdUser);
            var enterprise = _enterpriseRepository.GetById(relationship.IdEnterprise);

            Label UserName    = (Label)e.Row.FindControl("UserName");
            Label NomeEmpresa = (Label)e.Row.FindControl("NomeEmpresa");
            Label Logradouro  = (Label)e.Row.FindControl("Logradouro");

            UserName.Text    = usuario.Name + " " + usuario.LastName;
            NomeEmpresa.Text = enterprise.CorporateActivity;
            Logradouro.Text  = enterprise.StreetAdress + ", " + enterprise.City + ", " + enterprise.State + ", " + enterprise.ZipCode;
        }
Пример #3
0
 public DLModel.Enterprise getEnterpriseByID(int _id)
 {
     return(_enterpriseRepository.GetById(_id));
 }
Пример #4
0
 public Enterprise GetById(Guid id)
 {
     return(_repository.GetById(id));
 }