private void button1_Click(object sender, EventArgs e) { MeasuresEntity entity = (MeasuresEntity)comboBox3.SelectedItem; entity.Title = textBox1.Text; ApplicationLogic.Update(ApplicationLogic.Tables.Measures, entity); }
private void button1_Click(object sender, EventArgs e) { MeasuresEntity entity = new MeasuresEntity { Title = textBox1.Text }; ApplicationLogic.Insert(ApplicationLogic.Tables.Measures, entity); }
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); }
private void button1_Click(object sender, EventArgs e) { MeasuresEntity entity = (MeasuresEntity)comboBox3.SelectedItem; ApplicationLogic.Delete(ApplicationLogic.Tables.Measures, entity.ID); }