Esempio n. 1
0
        protected void Traffic_Click(object sender, EventArgs e)
        {
            BPerson bus = new BPerson();
            Person  prs = bus.GetByUsername("Salavati");

            prs.InitializeForTrafficMapper(Convert.ToDateTime("2012-07-20"), Convert.ToDateTime("2012-12-20"));

            TrafficMapper tm = new TrafficMapper(bus.GetByUsername("Salavati"));

            tm.DoMap();

            //BEngineCalculator bus1 = new BEngineCalculator();
            //bus1.Calculate(bus.GetByUsername("Salavati").ID, Utility.ToString(DateTime.Now.AddMonths(2)));
        }
Esempio n. 2
0
 public void Execute(decimal PersonId, DateTime FromDate, DateTime ToDate)
 {
     using (NHibernateSessionManager.Instance.BeginTransactionOn())
     {
         try
         {
             Person prs = Person.GetPersonRepository(false).GetById(PersonId, false);
             prs.InitializeForTrafficMapper(FromDate, ToDate);
             TrafficMapper tm = new TrafficMapper(prs, FromDate, ToDate);
             tm.DoMap();
             NHibernateSessionManager.Instance.CommitTransactionOn();
             tm.Dispose();
         }
         catch (Exception ex)
         {
             //gtsRuleLogger.Flush();
             NHibernateSessionManager.Instance.RollbackTransactionOn();
             throw;
         }
     }
 }