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

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

            objHrmsUI = new UDClass(sConnectionString);
            objHrmsUI.loadSettings();
            LTDDBUID = Program.objHrmsUI.getSetting("UID");
            LTDDBPWD = "SAPB1Admin"; //Program.objHrmsUI.getSetting("PWD");
            if (objHrmsUI.oCompany.Server.ToUpper() == "UBAID-PC")
            {
                LTDDBPWD = "super";                                                   //Program.objHrmsUI.getSetting("PWD");
            }
            INCDB = Program.objHrmsUI.getSetting("INCDB");
            LTDDB = Program.objHrmsUI.getSetting("LTDDB");

            string LTDConstr = "Data Source=" + objHrmsUI.oCompany.Server + ";Initial Catalog=" + LTDDB + ";Integrated Security=False;Persist Security Info=False;User ID=" + LTDDBUID + ";Password="******"";
            string INCConstr = "Data Source=" + objHrmsUI.oCompany.Server + ";Initial Catalog=" + INCDB + ";Integrated Security=False;Persist Security Info=False;User ID=" + LTDDBUID + ";Password="******"";

            dsLTD = new DataServices(LTDConstr);
            dsINC = new DataServices(INCConstr);

            System.Threading.Thread.CurrentThread.SetApartmentState(ApartmentState.STA);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run();
        }
예제 #2
0
파일: Program.cs 프로젝트: ubaidmughal/SAP
        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();
        }
예제 #3
0
        static void Main()
        {
            Program.isSel = "N";
            string sConnectionString = "0030002C0030002C00530041005000420044005F00440061007400650076002C0050004C006F006D0056004900490056";

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

            objHrmsUI = new UDClass(sConnectionString);

            System.Threading.Thread.CurrentThread.ApartmentState = ApartmentState.STA;
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run();
        }
예제 #4
0
        static void Main()
        {
            string sConnectionString = "0030002C0030002C00530041005000420044005F00440061007400650076002C0050004C006F006D0056004900490056";

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

            objHrmsUI = new UDClass(sConnectionString);

            readSettings();

            strConMena = "Data Source=" + Program.NopSServer + ";Initial Catalog=" + Program.NopDbName + ";Integrated Security=False;Persist Security Info=False;User ID=" + Program.NopDbUserName + ";Password="******"";
            strConSAP  = "Data Source=" + Program.SboServer + ";Initial Catalog=" + Program.companyDb + ";Integrated Security=False;Persist Security Info=False;User ID=" + Program.DbUserName + ";Password="******"";
            SboAPI     = new DIClass(companyDb, SboUID, SboPwd, DbUserName, DbPassword, ServerType, SboServer);


            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run();
        }