コード例 #1
0
        public static FuturAcquereur ToFuturAcquereur(this Couchbase.Lite.IMutableDictionary dico)
        {
            FuturAcquereur fa = App.Injector.GetInstance <FuturAcquereur>();

            fa.Id = dico.GetString("id");
            if (dico.GetDictionary("aquereurPrincipal") != null)
            {
                fa.AquereurPrincipal = dico.GetDictionary("aquereurPrincipal").ToAcquereur();
            }

            if (dico.GetDictionary("aquereurSecondaire") != null)
            {
                fa.AquereurSecondaire = dico.GetDictionary("aquereurSecondaire").ToAcquereur();
            }

            if (dico.GetDictionary("adresse") != null)
            {
                fa.Adresse = dico.GetDictionary("adresse").ToAdresse();
            }

            fa.SfaCode       = (dico.GetString("sfaCode") ?? "");
            fa.SfaLibelle    = (dico.GetString("sfaLibelle") ?? "");
            fa.LieuSituation = (dico.GetString("lieuSituation") ?? "");
            fa.Commentaires  = (dico.GetString("commentaires") ?? "");

            if (dico.GetString("dateSituation") != null)
            {
                fa.DateSituation = dico.GetDate("dateSituation").DateTime;
            }

            if (dico.GetArray("financements") != null)
            {
                foreach (IMutableDictionary element in dico.GetArray("financements"))
                {
                    fa.Financements.Add(element.ToFinancement());
                }
            }

            if (dico.GetArray("enfants") != null)
            {
                foreach (IMutableDictionary element in dico.GetArray("enfants"))
                {
                    fa.Enfants.Add(element.ToEnfant());
                }
            }

            if (dico.GetString("dateCreation") != null)
            {
                fa.DateCreation = dico.GetDate("dateCreation").DateTime;
            }
            if (dico.GetString("dateModif") != null)
            {
                fa.DateModif = dico.GetDate("dateModif").DateTime;
            }

            return(fa);
        }
コード例 #2
0
        public static Enfant ToEnfant(this Couchbase.Lite.IMutableDictionary dico)
        {
            Enfant enfant = new Enfant();

            if (dico.GetString("dateNaissance") != null)
            {
                enfant.DateNaissance = dico.GetDate("dateNaissance").Date;
            }

            return(enfant);
        }
コード例 #3
0
        public static TypeFinancement ToTypeFinancement(this Couchbase.Lite.IMutableDictionary dico)
        {
            TypeFinancement typeFinancement = new TypeFinancement()
            {
                FinCode      = (dico.GetString("finCode") ?? ""),
                FinLibelle   = (dico.GetString("finLibelle") ?? ""),
                DateCreation = Convert.ToDateTime(dico.GetString("dateCreation")),
                DateModif    = Convert.ToDateTime(dico.GetString("dateModif"))
            };

            return(typeFinancement);
        }
コード例 #4
0
        public static SituationFamille ToSituationFamille(this Couchbase.Lite.IMutableDictionary dico)
        {
            SituationFamille situationFamille = new SituationFamille()
            {
                SfaCode      = (dico.GetString("sfaCode") ?? ""),
                SfaLibelle   = (dico.GetString("sfaLibelle") ?? ""),
                DateCreation = Convert.ToDateTime(dico.GetString("dateCreation")),
                DateModif    = Convert.ToDateTime(dico.GetString("dateModif"))
            };

            return(situationFamille);
        }
コード例 #5
0
        public static Pays ToPays(this Couchbase.Lite.IMutableDictionary dico)
        {
            Pays pays = new Pays()
            {
                PayCode      = (dico.GetString("payCode") ?? ""),
                PayLibelle   = (dico.GetString("payLibelle") ?? ""),
                DateCreation = Convert.ToDateTime(dico.GetString("dateCreation")),
                DateModif    = Convert.ToDateTime(dico.GetString("dateModif"))
            };

            return(pays);
        }
コード例 #6
0
        public static Financement ToFinancement(this Couchbase.Lite.IMutableDictionary dico)
        {
            Financement financement = new Financement()
            {
                Information = dico.GetString("information"),
                FinCode     = dico.GetString("finCode"),
                FinLibelle  = dico.GetString("finLibelle"),
                Valeur      = dico.GetString("valeur")
            };

            return(financement);
        }
コード例 #7
0
        public static Civilite ToCivilite(this Couchbase.Lite.IMutableDictionary dico)
        {
            Civilite civilite = new Civilite()
            {
                CivCode      = (dico.GetString("civCode") ?? ""),
                CivLibelle   = (dico.GetString("civLibelle") ?? ""),
                DateCreation = Convert.ToDateTime(dico.GetString("dateCreation")),
                DateModif    = Convert.ToDateTime(dico.GetString("dateModif"))
            };

            return(civilite);
        }
コード例 #8
0
        public static DefaultVendeur ToDefaultVendeur(this Couchbase.Lite.IMutableDictionary dico)
        {
            DefaultVendeur defaultVendeur = new DefaultVendeur()
            {
                Nom       = dico.GetString("nom"),
                Email     = dico.GetString("email"),
                Telephone = dico.GetString("telephone"),
                Num       = dico.GetInt("num"),
                Id        = dico.GetString("id")
            };

            return(defaultVendeur);
        }
コード例 #9
0
        public static Vendeur ToVendeur(this Couchbase.Lite.IMutableDictionary dico)
        {
            Vendeur vendeur = new Vendeur
            {
                Nom          = dico.GetString("nom"),
                Email        = dico.GetString("email"),
                Telephone    = dico.GetString("telephone"),
                Num          = dico.GetInt("num"),
                Actif        = dico.GetInt("actif"),
                DateCreation = Convert.ToDateTime(dico.GetString("dateCreation")),
                DateModif    = Convert.ToDateTime(dico.GetString("dateModif"))
            };

            return(vendeur);
        }
コード例 #10
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);
        }
コード例 #11
0
        public static Constructeur ToConstructeur(this Couchbase.Lite.IMutableDictionary dico)
        {
            Constructeur constructeur = new Constructeur()
            {
                Num          = dico.GetInt("num"),
                Nom          = dico.GetString("nom"),
                Telephone    = dico.GetString("telephone"),
                Email        = dico.GetString("email"),
                Actif        = dico.GetInt("actif"),
                Adresse      = dico.GetDictionary("adresse").ToAdresse(),
                DateCreation = Convert.ToDateTime(dico.GetString("dateCreation")),
                DateModif    = Convert.ToDateTime(dico.GetString("dateModif"))
            };

            return(constructeur);
        }
コード例 #12
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);
        }
コード例 #13
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);
        }
コード例 #14
0
        public static Aquereur ToAcquereur(this Couchbase.Lite.IMutableDictionary dico)
        {
            Aquereur aquereur = new Aquereur();

            if (dico.GetString("dateNaissance") != null)
            {
                aquereur.DateNaissance = dico.GetDate("dateNaissance").DateTime;
            }

            if (dico.GetString("email") != null)
            {
                aquereur.Email = dico.GetString("email");
            }

            if (dico.GetString("lieuNaissance") != null)
            {
                aquereur.LieuNaissance = dico.GetString("lieuNaissance");
            }

            if (dico.GetString("lieuTravail") != null)
            {
                aquereur.LieuTravail = dico.GetString("lieuTravail");
            }

            if (dico.GetString("nationalite") != null)
            {
                aquereur.Nationalite = dico.GetString("nationalite");
            }

            if (dico.GetString("nom") != null)
            {
                aquereur.Nom = dico.GetString("nom");
            }

            if (dico.GetString("portable") != null)
            {
                aquereur.Portable = dico.GetString("portable");
            }

            if (dico.GetString("prenom") != null)
            {
                aquereur.Prenom = dico.GetString("prenom");
            }

            if (dico.GetString("profession") != null)
            {
                aquereur.Profession = dico.GetString("profession");
            }

            aquereur.SalaireNetMensuel = dico.GetDouble("salaireNetMensuel");

            if (dico.GetString("telPro") != null)
            {
                aquereur.TelPro = dico.GetString("telPro");
            }

            if (dico.GetString("titreSejour") != null)
            {
                aquereur.TitreSejour = dico.GetString("titreSejour");
            }

            if (dico.GetString("profession") != null)
            {
                aquereur.Profession = dico.GetString("profession");
            }

            if (dico.GetString("civCode") != null)
            {
                aquereur.CivCode = dico.GetString("civCode");
            }

            if (dico.GetString("civLibelle") != null)
            {
                aquereur.CivLibelle = dico.GetString("civLibelle");
            }

            return(aquereur);
        }