Beispiel #1
0
        public LoginForm(UserInforDB userInforDB, HisLogSystemDB log)
        {
            this.userInforDB = userInforDB;
            this.log         = log;

            InitializeComponent();
        }
        public LogHisSystem(string conn)
        {
            db = new HisLogSystemDB(conn);
            InitializeComponent();

            LoadHisDB();
        }
Beispiel #3
0
        public AppsLIST()
        {
            logger = NLog.LogManager.GetCurrentClassLogger();

            var      exepath      = System.Reflection.Assembly.GetExecutingAssembly().Location;
            var      directory    = System.IO.Path.GetDirectoryName(exepath);
            XElement XSettingPath = XElement.Load(directory + "/setting.xml");
            var      XConnString  = XSettingPath.Element("connectionStringDB");

            connString = XConnString.Attribute("path").Value;

            logger.Info(exepath);
            logger.Info(directory);
            logger.Info(connString);

            listDMDanTocs        = new List <DMDanToc>();
            listDMThanhPhos      = new List <DMThanhPho>();
            listDMTinhThanhs     = new List <DMTinhThanh>();
            listDMTrinhDoHocVans = new List <DMTrinhDoHocVan>();
            listPermiss          = new List <PhanQuyen>();

            userDB   = new UserInforDB(connString);
            hislogDB = new HisLogSystemDB(connString);

            LoginForm login = new LoginForm(userDB, hislogDB);

            login.ShowDialog();

            if (login.ISOK)
            {
                UserNameLogIn = login.GetUserLogin();

                NguoiSuDung nsd = userDB.GetUserInfor(UserNameLogIn);
                isUserAdmin = nsd.IsAdmin;
                danhmucDB   = new ChiMucDB(connString);

                InitializeComponent();
                this.WindowState = FormWindowState.Maximized;

                ShowFormBegin();

                IsOK = BeginInit(login.GetUserLogin());
            }
        }