示例#1
0
        private void hsNew_Click(object sender, EventArgs e)
        {
            _procedureObject             = new ProcedureClass();
            _procedureObject.Name        = "NEW_PROCEDURE";
            _procedureObject.Description = "";

            var pc = new ParameterClass();

            pc.Name       = "X";
            pc.RawType    = "INTEGER";
            pc.FieldType  = "LONG";
            pc.TypeNumber = 8;
            pc.Length     = 4;
            pc.Precision  = 0;
            _procedureObject.ParameterOut.Add(pc);

            pc            = new ParameterClass();
            pc.Name       = "XX";
            pc.RawType    = "INTEGER";
            pc.FieldType  = "LONG";
            pc.TypeNumber = 8;
            pc.Length     = 4;
            pc.Precision  = 0;
            _procedureObject.ParameterIn.Add(pc);

            _procedureObjectOld = (ProcedureClass)_procedureObject.Clone();
            BearbeitenMode      = StateClasses.EditStateClass.eBearbeiten.eInsert;
            DataToEdit();
            MakeSQL();
        }
示例#2
0
        private async void procedureDG_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            client = new APIClient();

            selectedpt = (ProcedureClass)procedureDG.SelectedItem;

            proceduresClassssss = await client.GetProcedures();

            treatmentClassssss = await client.GetTreatments();

            ptt = (from p in proceduresClassssss
                   join t in treatmentClassssss
                   on p.ProcedureID equals t.ProcedureID
                   where selectedpt.ProcedureID == t.ProcedureID
                   select new ProceduresTreatments
            {
                PetName = t.PetName,
                OwnerID = t.OwnerID,
                ProcedureID = p.ProcedureID,
                Description = p.Description,
                Date = t.Date,
                Notes = t.Notes,
                Price = p.Price
            }).ToList();

            treatmentsDG.ItemsSource = ptt;
        }
示例#3
0
        public void testCallproc()
        {
            //create instance of procedure class
            ProcedureClass proc = new ProcedureClass();

            //run procedure through class
            //using test values
            proc.loginCreate("testID", "testforename", "testsurname", "testpassword", 1, "*****@*****.**");
        }
示例#4
0
        public ProcedureForm(Form parent, DBRegistrationClass dbReg, TreeNode tn, ContextMenuStrip cm, StateClasses.EditStateClass.eBearbeiten mode)
        {
            InitializeComponent();
            this.MdiParent = parent;
            _tn            = tn;
            _cm            = cm;

            try
            {
                BearbeitenMode = mode;
                if (BearbeitenMode == StateClasses.EditStateClass.eBearbeiten.eInsert)
                {
                    _procedureObject      = new ProcedureClass();
                    _procedureObject.Name = "NEW_PROCEDURE";
                }
                else
                {
                    _procedureObject = (ProcedureClass)tn.Tag;
                }
            }
            catch
            {
            }
            _procedureObjectOld = (ProcedureClass)_procedureObject.Clone();

            _dbReg = dbReg;
            _localNotify.Notify.OnRaiseErrorHandler += Notify_OnRaiseErrorHandler;
            _localNotify.Notify.OnRaiseInfoHandler  += Notify_OnRaiseInfoHandler;
            cbDatatype.Items.Clear();

            DBTypeList dbList = new DBTypeList();

            foreach (DBDataTypes dt in dbList.Values)
            {
                cbDatatype.Items.Add(dt);
            }


            _doEvents = true;
        }