Ejemplo n.º 1
0
        public bool Create(IUser user)
        {
            IUserDao dao = AlbianServiceRouter.ObjectGenerator <UserDao, IUserDao>();
            ILogInfo log = AlbianObjectFactory.CreateInstance <LogInfo>();

            log.Content    = string.Format("创建用户,用户id为:{0}", user.Id);
            log.CreateTime = DateTime.Now;
            log.Creator    = user.Id;
            log.Id         = AlbianObjectFactory.CreateId("Log");
            log.Style      = InfoStyle.Registr;
            IList <IAlbianObject> infos = new List <IAlbianObject> {
                user, log
            };

            return(dao.Create(infos));
        }
Ejemplo n.º 2
0
        public virtual bool Modify(IBizOffer bizoffer)
        {
            ILogInfo log = AlbianObjectFactory.CreateInstance <LogInfo>();

            log.Content    = string.Format("修改发布单,发布单id为:{0}", bizoffer.Id);
            log.CreateTime = DateTime.Now;
            log.Creator    = bizoffer.Id;
            log.Id         = AlbianObjectFactory.CreateId("Log");
            log.Style      = InfoStyle.Publish;

            IList <IAlbianObject> list = new List <IAlbianObject> {
                bizoffer, log
            };
            IBizofferDao dao = AlbianServiceRouter.ObjectGenerator <BizofferDao, IBizofferDao>();

            return(dao.Modify(list));
        }
Ejemplo n.º 3
0
        public bool Modify(string id, string nickName)
        {
            IUserDao dao  = AlbianServiceRouter.ObjectGenerator <UserDao, IUserDao>();
            IUser    user = dao.Load(id);

            user.Nickname       = nickName;
            user.LastMofidyTime = DateTime.Now;
            user.LastModifier   = id;

            ILogInfo log = AlbianObjectFactory.CreateInstance <LogInfo>();

            log.Content    = string.Format("修改用户,用户id为:{0}", user.Id);
            log.CreateTime = DateTime.Now;
            log.Creator    = user.Id;
            log.Id         = AlbianObjectFactory.CreateId("Log");
            log.Style      = InfoStyle.Modify;
            IList <IAlbianObject> infos = new List <IAlbianObject> {
                user, log
            };

            return(dao.Modify(infos));
        }
Ejemplo n.º 4
0
        public virtual IBizOffer LoadBizOffer(string id)
        {
            IBizofferDao dao = AlbianServiceRouter.ObjectGenerator <BizofferDao, IBizofferDao>();

            return(dao.Load("IdRouting", id));
        }
Ejemplo n.º 5
0
        public IList <BizOffer> FindBizoffer()
        {
            IBizofferDao dao = AlbianServiceRouter.ObjectGenerator <BizofferDao, IBizofferDao>();

            return(dao.FindBizoffer());
        }