public frmDiagUnboundErrand(string cust, string onr)
        {
            InitializeComponent();
            erUnbound = new ErrandFunc();
            sCustomer = cust;
            sOnr = onr;

            lwErrand.Items.AddRange(ErrandFunc.Errand.convertToErrand(erUnbound.getUnboundErrands(cust, onr)));
            if (lwErrand.Items.Count > 0)
                lwErrand.Items[0].Selected = true;

            // Fyll combo med orderinformation
            lwOrder.Items.AddRange(OrderHeadDefinition.convertToListView(oOH.getPatientsAllOH(cust)));
        }
Exemplo n.º 2
0
        private bool createObject()
        {
            try
            {
                frmControler = FormControler.getInstance();

                oCust = new CustomerFunc();
                oOH = new orderFunc();
                oOR = new OrderRowFunc();
                oErr = new ErrandFunc();
                oCon = new Contacts();
                oPrislista = new Prislista();
                oDelM = new DeliveryMode();
                oDiagnos = new Diagnos();
            }
            catch (Exception ex)
            {
                MessageBox.Show(this, "Garp verkar inte vara startat eller så inträffades \nett fel vid start (se felmeddelande), prova att starta Garp \noch försök igen \n\n(" + ex.Message + ")", "Fel vid start", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Application.Exit();
                return false;
            }
            return true;
        }