Example #1
0
        private string createRowOnPatientsOrder()
        {
            orderFunc oOH = new orderFunc();
            OrderRowFunc oOR = new OrderRowFunc();
            OrderHeadDefinition oh = oOH.addOH(mKnr);

            if (oh == null)
            {
                return "";
            }

            oh.OrderType = "E";
            oh.PaymentCondition = mBvk;
            oOH.saveOH(oh);
            oOH.changeAddress(oh.OrderNo, mNamn, mAdress1, mAdress2, mOrt);

            // Orderrad på patientens order
            string rownr = oOR.addNewRow(oh.OrderNo, "", "EA");
            mOr = new OrderRowDefinitions.OrderRow();
            mOr.OrderNo = oh.OrderNo;
            mOr.AidNr = "";
            mOr.Rad = rownr;
            mOr.Artikel = "EA";
            mOr.Antal = "0";
            //			mOr.AccountNo = oOR.getAccountOnAid(mOnr, mAidId);
            mOr.Beloppsrad = true;
            mOr.EA_ProductGroup = mProductGroup;

            try
            {
                mOr.APris = mAmount;
                oOR.saveOrderRow(mOr, false, false);
            }
            catch
            {
                MessageBox.Show(null, "Inget gilltigt belopp", "Fel inmatning (2)", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            mFsNr = oOR.deliverOwnFeeRow(mOr.OrderNo, mOr.Rad, mOr.Antal, "", mFsNr);

            return mOr.OrderNo.PadRight(6) + " - " + mOr.Rad;
        }
Example #2
0
 private void btnNewRead_Click(object sender, EventArgs e)
 {
     orderFunc oOH = new orderFunc();
       lwOrderHuvud.Items.Clear();
       lwOrderHuvud.Items.AddRange(OrderHeadDefinition.convertToThordListView(oOH.getAllOHWithOrderType(Config.getNumberSerie(), false)));
 }
        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;
        }