コード例 #1
0
        public OrderRowFunc()
        {
            if (Config.IsThordUser)
            {
                garpref = new GarpReferrals();
                thordfunc = new ThordFunctions();
            }

            try
            {
                mOR = new OrderRowCOM();
            }
            catch { }

            try
            {
                InstanceContext context = new InstanceContext(this);
                mProdClient = new ProductionService.OrderServiceClient(context);
            }
            catch(Exception e)
            {
                Logger.loggError(e, "Error creating OrderServiceClient", "", "OrderRowFunc()");
            }
        }
コード例 #2
0
        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");
            }
        }
コード例 #3
0
 public ThordFunctionsThreaded(ThordFunctions thordfunctions)
 {
     tf = thordfunctions;
 }
コード例 #4
0
        /// <summary>
        /// Creates a missing customer and sets it's values
        /// from Thord.
        /// </summary>
        /// <param name="personnr">person number</param>
        public void createCustomer(ArrayList personnr)
        {
            string[] pnummer = (string[])personnr.ToArray(typeof(string));
            ThordFunctions tf = new ThordFunctions();
            ThordService.personinformation pinfo = new ThordService.personinformation();
            PatientDefenition newPatient = new PatientDefenition();

            pinfo = tf.getPersonInfo(pnummer);
            for (int i = 0; i < pinfo.person.Length; i++)
            {
                string namn = pinfo.person[i].lastname + pinfo.person[i].firstname;
                namn = namn.Replace("/", " ");

                String prnummer = pinfo.person[i].personnumber.Insert(8, "-");

                newPatient.PatientNo = "";
                newPatient.SSN = prnummer;
                newPatient.LastName = pinfo.person[i].lastname;
                newPatient.SureName = pinfo.person[i].firstname;
                newPatient.Address = pinfo.person[i].street;
                newPatient.PoCity = pinfo.person[i].postalcode.PadRight(7) + pinfo.person[i].postaladdress;
                newPatient.TelHome = pinfo.person[i].phonehome;
                newPatient.TelWork = pinfo.person[i].phonework;
                newPatient.TelMobile = pinfo.person[i].phonemobile;
                newPatient.Category = Ortoped.HelpClasses.Config.getCustTemplate.Category;
                newPatient.DeliverTerms = Ortoped.HelpClasses.Config.getCustTemplate.DeliverTerms;
                newPatient.PaymentTerms = Ortoped.HelpClasses.Config.getCustTemplate.PaymentTerms;
                newPatient.PriceList = Ortoped.HelpClasses.Config.getCustTemplate.PriceList;
                newPatient.VATCode = Ortoped.HelpClasses.Config.getCustTemplate.VATCode;
                newPatient.WayOfDeliver = Ortoped.HelpClasses.Config.getCustTemplate.WayOfDeliver;
                newPatient.ViewCode = Ortoped.HelpClasses.Config.getCustTemplate.ViewCode;
                newPatient.InterestInvoice = Ortoped.HelpClasses.Config.getCustTemplate.InterestInvoice;
                newPatient.PaymentReminder = Ortoped.HelpClasses.Config.getCustTemplate.PaymentReminder;
                newPatient.DoesExist = true;

                try
                {
                    oCust.addCustomer(newPatient);
                }
                catch (Exception ex)
                {
                    Log4Net.Logger.loggError(ex, "Error while adding patient", Config.User, "GarpReferrals.createCustomer");
                    throw ex;
                }
            }
        }