Beispiel #1
0
        static void Main()
        {
            Program.isSel = "N";
            string sConnectionString = "0030002C0030002C00530041005000420044005F00440061007400650076002C0050004C006F006D0056004900490056";

            try
            {
                sConnectionString = Environment.GetCommandLineArgs().GetValue(1).ToString();
            }
            catch { }

            objHrmsUI = new UDClass(sConnectionString);

            System.Data.DataTable dtSetting = objHrmsUI.getDataTable("Select * from [@B1_SETTING]", "getting setting");
            if (dtSetting != null && dtSetting.Rows.Count > 0)
            {
                DataRow[] drs = dtSetting.Select("Name='strExtCon'");
                if (drs.Count() > 0)
                {
                    Program.strExtCon = drs[0]["U_Value"].ToString();
                }
            }
            System.Threading.Thread.CurrentThread.ApartmentState = ApartmentState.STA;
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run();
        }
Beispiel #2
0
        public static void readSettings()
        {
            DataTable dtConf = objHrmsUI.getDataTable("Select * from [@Mena_Config]", "Reading Settings");

            if (dtConf.Rows.Count > 0)
            {
                NopSServer    = dtConf.Rows[0]["U_server"].ToString();
                NopDbName     = dtConf.Rows[0]["U_db"].ToString();
                NopDbUserName = dtConf.Rows[0]["U_uid"].ToString();
                NopDbPassword = dtConf.Rows[0]["U_pwd"].ToString();
            }
            else
            {
            }

            strConMena = "Data Source=" + Program.NopSServer + ";Initial Catalog=" + Program.NopDbName + ";Integrated Security=False;Persist Security Info=False;User ID=" + Program.NopDbUserName + ";Password="******"";
        }