static void Main() { string db = "AYC_Db01N"; string server = "AYYEKA-SAP\\SAP"; string serverType = "2012"; string dbuser = "******"; string dbPwd = "SAPB1Admin"; string sboId = "manager"; string sboPwd = "3331"; //db = "SBODemoAU"; //server = "ubaid-pc"; //serverType = "2012"; //dbuser = "******"; //dbPwd = "super"; //sboId = "manager"; //sboPwd = "super"; sboDI = new DIClass(db, sboId, sboPwd, dbuser, dbPwd, serverType, server); string conStat = sboDI.connectCompany(); if (conStat != "OK") { // MessageBox.Show("Unable to connect to sbo"); } string sourceConstr = "Data Source=" + server + ";Initial Catalog=" + db + ";Integrated Security=False;Persist Security Info=False;User ID=" + dbuser + ";Password="******"Connection Status : " + conStat); try { UpdateForDate(DateTime.Now.Date); } catch (Exception ex) { // MessageBox.Show(ex.Message); } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Exit(); //Application.Run(new Form1()); }
static void Main() { try { email = getSetting("email"); emailpwd = getSetting("emailpwd"); smtpserver = getSetting("smtpserver"); port = getSetting("port"); db = getSetting("db"); server = getSetting("server"); serverType = getSetting("serverType"); dbuser = getSetting("dbuser"); dbPwd = encriptor.Decrypt(getSetting("dbPwd")); sboId = getSetting("sboId"); sboPwd = encriptor.Decrypt(getSetting("sboPwd")); sboDI = new DIClass(db, sboId, sboPwd, dbuser, dbPwd, serverType, server); string conStat = sboDI.connectCompany(); MessageBox.Show(conStat); string sourceConstr = "Data Source=" + server + ";Initial Catalog=" + db + ";Integrated Security=False;Persist Security Info=False;User ID=" + dbuser + ";Password="******"Connection Status : " + conStat); try { MessageBox.Show("getting orders"); // getOrders(); changetonewOrders(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } catch (Exception ex) { MessageBox.Show(ex.Message); } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Exit(); //Application.Run(new Form1()); }