示例#1
0
        public static Visite getFirst(string where)
        {
            Visite res = null;

            var temp = DbManager.getFirst(Configuration.Config.DB_PATH, TABLE_NAME, where);

            if (temp != null)
            {
                res = createEntityFrom(temp);
            }

            return(res);
        }
示例#2
0
        private static Visite createEntityFrom(Dictionary <string, object> dict)
        {
            Visite ob = new Visite()
            {
                Id          = Guid.Parse((String)dict["id"]),
                Id_agent    = Guid.Parse((String)dict["idagent"]),
                Id_acheteur = Guid.Parse((String)dict["idacheteur"]),
                Id_biens    = Guid.Parse((String)dict["idbiens"]),
                Date        = (String)dict["date"]
            };



            return(ob);
        }
示例#3
0
        //public static Boolean save(Visite obj)
        //{
        //    if (obj.Id == Guid.Empty)
        //    {
        //        return insert(obj);
        //    }
        //    else
        //    {
        //        return update(obj);
        //    }
        //}

        public static Boolean insert(Visite obj)
        {
            obj.id = Guid.NewGuid();
            return(DbManager.insert(Configuration.Config.DB_PATH, TABLE_NAME, COLUMNS, obj.getValues()));
        }