Exemplo n.º 1
0
        public virtual MatchhistoryDomain CreateMatchhistoryDomain()
        {
            MatchhistoryEntity entity = new MatchhistoryEntity();
            entity.MatchedId = Guid.NewGuid().ToString();

            return new MatchhistoryDomain(entity);
        }
Exemplo n.º 2
0
 public MatchhistoryDomain(MatchhistoryEntity entity)
     : base(entity)
 {
     masterEntity = entity;
 }
Exemplo n.º 3
0
        public virtual bool MatchStore(StoreEntity entityNew, StoreEntity entityImport, string userId)
        {
             int total_success_import = 0;
             using (DataAccessBroker broker = DataAccessFactory.Instance())
             {
                 broker.BeginTransaction();
                 try
                 {
                     DateTime timeNow = DateTime.Now;

                     entityNew.IsMatched = "Y";
                     entityNew.MatchDate = timeNow;

                     entityImport.IsMatched = "Y";
                     entityImport.MatchDate = timeNow;

                     MatchhistoryEntity entity = new MatchhistoryEntity();
                     entity.MatchedId = Guid.NewGuid().ToString();
                     entity.StoreIdNew = entityNew.DmsStoreId;
                     entity.DmsIdNew = entityNew.DmsId;

                     entity.StoreIdImport = entityImport.DmsStoreId;
                     entity.DmsIdImport = entityImport.DmsId;

                     entity.IsDeleted = "N";
                     entity.MatchDate = timeNow;
                     entity.MatchUser = userId;

                     DataAccess.Update(entityNew, broker);
                     DataAccess.Update(entityImport, broker);
                     DataAccess.Insert(entity, broker);

                     broker.Commit();
                     return true;
                 }
                 catch
                 {
                     broker.RollBack();
                     return false;
                 }
             }
        }
Exemplo n.º 4
0
 public virtual void UpdateMatchhistoryEntity(MatchhistoryEntity entity, DataAccessBroker broker)
 {
     DataAccess.Update(entity, broker);
 }
Exemplo n.º 5
0
 public virtual void InsertMatchhistoryEntity(MatchhistoryEntity entity, DataAccessBroker broker)
 {
     DataAccess.Insert(entity, broker);
 }