/// <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"); }
private void ThordMainForm_Load(object sender, EventArgs e) { //string sVersion = System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).FileVersion; //this.Text = "Garp Remiss " +sVersion; try { if (Application.ProductVersion.Substring(4, 1).Equals("0")) this.Text = Application.ProductName + " - " + Application.ProductVersion.Substring(0, 3); else this.Text = Application.ProductName + " - " + Application.ProductVersion.Substring(0, 5); labUser.Text = Config.ThordUserId; labPassword.Text = Config.ThordPassword; } catch { this.Text = Application.ProductName; } try { oCust = new Ortoped.GarpFunctions.CustomerFunc(); tf = new ThordFunctions(); gf = new GarpReferrals(); } catch (Exception ex) { Log4Net.Logger.loggError(ex, "Error when collection refferals from Thord", Config.User, "frmDiagThord.ThordMainForm_Load"); } }