コード例 #1
0
        public static Programme ToProgramme(this Couchbase.Lite.IMutableDictionary dico)
        {
            Programme programme = new Programme
            {
                Num          = dico.GetLong("num"),
                Libelle      = dico.GetString("libelle"),
                Localite     = dico.GetString("localite"),
                DepCode      = dico.GetString("depCode"),
                PetNumero    = dico.GetLong("petNumero"),
                Etat         = dico.GetString("etat"),
                DateCreation = Convert.ToDateTime(dico.GetString("dateCreation")),
                DateModif    = Convert.ToDateTime(dico.GetString("dateModif"))
            };

            return(programme);
        }
コード例 #2
0
        public static Lot ToLot(this Couchbase.Lite.IMutableDictionary dico)
        {
            Lot lot = new Lot()
            {
                Num                = dico.GetLong("num"),
                PgrNum             = dico.GetLong("pgrNum"),
                Code               = dico.GetString("code"),
                Surface            = dico.GetDouble("surface"),
                SurfacePlancher    = dico.GetDouble("surfacePlancher"),
                Facade             = dico.GetString("facade"),
                LetCode            = dico.GetString("letCode"),
                Etat               = dico.GetString("etat"),
                PrixVenteConseille = dico.GetDouble("prixVenteConseille"),
                DateCreation       = Convert.ToDateTime(dico.GetString("dateCreation")),
                DateModif          = Convert.ToDateTime(dico.GetString("dateModif"))
            };

            return(lot);
        }
コード例 #3
0
        public static Adresse ToAdresse(this Couchbase.Lite.IMutableDictionary dico)
        {
            Adresse adresse = new Adresse();

            if (dico.GetString("intitule1") != null)
            {
                adresse.Intitule1 = dico.GetString("intitule1");
            }

            if (dico.GetString("intitule2") != null)
            {
                adresse.Intitule2 = dico.GetString("intitule2");
            }

            if (dico.GetString("intitule3") != null)
            {
                adresse.Intitule3 = dico.GetString("intitule3");
            }

            if (dico.GetString("libelle1") != null)
            {
                adresse.Libelle1 = dico.GetString("libelle1");
            }

            if (dico.GetString("libelle2") != null)
            {
                adresse.Libelle2 = dico.GetString("libelle2");
            }

            if (dico.GetString("libelle3") != null)
            {
                adresse.Libelle3 = dico.GetString("libelle3");
            }

            if (dico.GetString("pays") != null)
            {
                adresse.Pays = dico.GetString("pays");
            }

            if (dico.GetString("payCode") != null)
            {
                adresse.PayCode = dico.GetString("payCode");
            }
            else
            {
                adresse.PayCode = adresse.Pays;
            }

            if (dico.GetString("codePostal") != null)
            {
                adresse.CodePostal = dico.GetString("codePostal");
            }

            if (dico.GetString("ville") != null)
            {
                adresse.Ville = dico.GetString("ville");
            }

            adresse.ComNum = dico.GetLong("comNum");

            return(adresse);
        }