public FacilityViewModel()
 {
     facility         = new Facility();
     owner            = new FacilityOwner();
     contacts         = new KmhflContactsObject();
     FacilityChecks   = new List <Norms>();
     HumanResources   = new List <Norms>();
     Infrastructure   = new List <Norms>();
     FacilityServices = new List <Norms>();
 }
        public FacilityOwner GetFacilityOwner(Facility facility)
        {
            FacilityOwner owner = new FacilityOwner();

            SqlServerConnection conn = new SqlServerConnection();
            SqlDataReader       dr   = conn.SqlServerConnect("SELECT fo_idnt, fo_type, fo_name, fo_image FROM facilityOwner WHERE fo_name='" + facility.Owner + "'");

            if (dr.Read())
            {
                owner = new FacilityOwner
                {
                    Id    = Convert.ToInt16(dr[0]),
                    Type  = dr[1].ToString(),
                    Name  = dr[2].ToString(),
                    Image = dr[3].ToString()
                };
            }

            return(owner);
        }