示例#1
0
        public frmUserManager()
        {
            InitializeComponent();
            nw = new nwdbConnection();

            //Update
            //nw = new nwdbConnection();


            sessionFactory         = nw.Factory;
            repo                   = new nwdbRepository(sessionFactory.OpenSession());
            sess                   = repo.GetSession();
            stm                    = new sysTreeManager();
            bs_hostUser.DataSource = sess.QueryOver <hostUser>().List();
            bs_userType.DataSource = sess.QueryOver <hostUserType>().List();
        }
示例#2
0
 private void FrmLogon_Load(object sender, EventArgs e)
 {
     Debug.Print("LOAD FIRED");
     //Create&Drop
     if (nw == null)
     {
         nw = new nwdbConnection();
     }
     sessionFactory = nw.Factory;
     if (repo == null)
     {
         repo = new nwdbRepository(sessionFactory.OpenSession());
     }
     sess = repo.GetSession();
     //this.btnLogin_Click(this, null);
 }