protected bool connectToGarp(string user, string pwd) { if (app == null) app = new Garp.Application(); // Om användare skickas med så gör en inloggning if(!user.Trim().Equals("")) app.Login(user,pwd); return checkGarp(); }
public GarpGenericDB(string table, string user, string password) { app = new Garp.Application(); app.Login(user, password); //Logger.loggInfo("Try to create Table " + table + " with User " + user + " and password " + password, "GCS", ""); //Logger.loggInfo("...logged in user is " + app.User, "GCS", ""); _table = app.Tables.Item(table); createFields(); //Logger.loggInfo("Try to create Table is...DONE!", "GCS", ""); }
public Customer() { try { mBCCustomer = ConfigurationManager.AppSettings["CustomerLoginName"].ToString(); //mBCUserName = ConfigurationManager.AppSettings["UserLoginName"].ToString(); //mBCPassword = ConfigurationManager.AppSettings["Password"].ToString(); mBCLanguage = ConfigurationManager.AppSettings["Language"].ToString(); mBCPackage = ConfigurationManager.AppSettings["PackageName"].ToString(); mBCReportType = ConfigurationManager.AppSettings["ReportType"].ToString(); } catch { } try { app = new Garp.Application(); mTA = app.Tables.Item("TA"); mTA_TX1 = mTA.Fields.Item("TX1"); if (mTA.Find("W100FU" + app.User.Trim())) { if (noNULL(mTA_TX1.Value).Contains(";")) { string[] s = mTA_TX1.Value.Split(';'); mBCUserName = s[0]; mBCPassword = s[1]; } } oComp = app.Components; dsKA = app.Datasets.Item("McDataSet1"); oComp.BaseComponent = "Panel1"; if (!string.IsNullOrEmpty(mBCUserName)) { createButton(); oComp.Item("McText1").Width = oComp.Item("McText1").Width + 5; dsKA.BeforePost += new Garp.IDatasetEvents_BeforePostEventHandler(dsKA_BeforePost); dsKA.AfterScroll += new Garp.IDatasetEvents_AfterScrollEventHandler(dsKA_AfterScroll); app.ButtonClick += new Garp.IGarpApplicationEvents_ButtonClickEventHandler(app_ButtonClick); } // ctx = new DataImport2SoapClient("DataImport2Soap"); } catch (Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message); } }
public Purchase() { mGarp = new Garp.Application(); mIGA = new GarpGenericDB("IGA"); mIGK = new GarpGenericDB("IGK"); mHIA = new GarpGenericDB("HIA"); mLR = new GarpGenericDB("LR"); dsIGR = mGarp.Datasets.Item("igrMcDataSet"); dsIGR.AfterScroll += new Garp.IDatasetEvents_AfterScrollEventHandler(dsIGR_AfterScroll); dsIGR.BeforePost += new Garp.IDatasetEvents_BeforePostEventHandler(dsIGR_BeforePost); mGarp.ButtonClick += new Garp.IGarpApplicationEvents_ButtonClickEventHandler(mGarp_ButtonClick); mInvoiceButton = mGarp.Components.AddButton("Invoice"); mInvoiceButton.Top = 3; mInvoiceButton.Left = 550; mInvoiceButton.Text = "Fakturanr"; }
/// <summary> /// The constructor creates the Garp.ApplicationClass /// and all the Garp objects /// </summary> public GarpReferrals() { try { app = new Garp.Application(); oCust = new Ortoped.GarpFunctions.CustomerFunc(); } catch { Console.WriteLine("Garp kunde inte startas.."); } mKA = app.Tables.Item("KA"); mAGA = app.Tables.Item("AGA"); mAGT = app.Tables.Item("AGT"); mAGA_ANR = mAGA.Fields.Item("ANR"); mAGA_SES = mAGA.Fields.Item("SES"); mAGA_STA = mAGA.Fields.Item("STA"); mAGA_KD1 = mAGA.Fields.Item("KD1"); mAGA_KD6 = mAGA.Fields.Item("KD6"); mAGT_ANR = mAGT.Fields.Item("ANR"); mAGT_TX15 = mAGT.Fields.Item("TX15"); mKA_KNR = mKA.Fields.Item("KNR"); mKA_NAM = mKA.Fields.Item("NAM"); mKA_AD1 = mKA.Fields.Item("AD1"); mKA_AD2 = mKA.Fields.Item("AD2"); mKA_ORT = mKA.Fields.Item("ORT"); mKA_KAT = mKA.Fields.Item("KAT"); mKA_LVK = mKA.Fields.Item("LVK"); mKA_KD6 = mKA.Fields.Item("KD6"); mKA_BVK = mKA.Fields.Item("BVK"); mKA_PRL = mKA.Fields.Item("PRL"); mKA_MOM = mKA.Fields.Item("MOM"); mKA_LSE = mKA.Fields.Item("LSE"); mKA_KTY = mKA.Fields.Item("KTY"); }
public GarpGenericDB(string table) { app = new Garp.Application(); _table = app.Tables.Item(table); createFields(); }