Exemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            MeasuresEntity entity = (MeasuresEntity)comboBox3.SelectedItem;

            entity.Title = textBox1.Text;
            ApplicationLogic.Update(ApplicationLogic.Tables.Measures, entity);
        }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            MeasuresEntity entity = new MeasuresEntity {
                Title = textBox1.Text
            };

            ApplicationLogic.Insert(ApplicationLogic.Tables.Measures, entity);
        }
Exemplo n.º 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            ManufacturersEntity selectedManufacturer = (ManufacturersEntity)ManufacturersCB.SelectedItem;
            MeasuresEntity      selectedMeasure      = (MeasuresEntity)measuresCB.SelectedItem;
            DrugsEntity         entity = new DrugsEntity
            {
                ManufacturerID = selectedManufacturer.ID,
                MeasureID      = selectedMeasure.ID,
                ExpTerm        = textBoxExpTerm.Text,
                Purpose        = textBoxPurpose.Text,
                Quantity       = Convert.ToInt32(textBoxQuantity.Text),
                Price          = Convert.ToInt32(textBoxPrice.Text),
                Indications    = textBoxIndications.Text,
                Title          = textBoxTitle.Text
            };

            ApplicationLogic.Insert(ApplicationLogic.Tables.Drugs, entity);
        }
Exemplo n.º 4
0
        private void button1_Click(object sender, EventArgs e)
        {
            MeasuresEntity entity = (MeasuresEntity)comboBox3.SelectedItem;

            ApplicationLogic.Delete(ApplicationLogic.Tables.Measures, entity.ID);
        }