protected void AddLabOrderToData_Click(object sender, EventArgs e) { AddLabDiv.Visible = false; int iddoctor = Convert.ToInt32(DoctorNameLab.Text); DateTime dat = DateTime.Parse(DateLab.Text); var drug = new LabOrder() { DoctorID = iddoctor, Date = dat }; DataBaseAllDataContext dataAll = new DataBaseAllDataContext(); dataAll.LabOrders.InsertOnSubmit(drug); dataAll.SubmitChanges(); AddLabOrderGrid.DataBind(); }
protected void AddNewDrug_ClickG(object sender, EventArgs e) { if (IsValid) { TableAddDrugG.Visible = false; int iddoctor = Convert.ToInt32(DoctorID.Text); DateTime dat = DateTime.Parse(date.Text); var drug = new LabOrder() { DoctorID = iddoctor, Date = dat }; DataBaseAllDataContext dataAll = new DataBaseAllDataContext(); dataAll.LabOrders.InsertOnSubmit(drug); dataAll.SubmitChanges(); GridDrugG.DataBind(); TableAddDrugG.Visible = false; GridDrugG.Visible = true; ViewState["state"] = "load"; } }
partial void DeleteLabOrder(LabOrder instance);
partial void UpdateLabOrder(LabOrder instance);
partial void InsertLabOrder(LabOrder instance);
private void detach_LabOrders(LabOrder entity) { this.SendPropertyChanging(); entity.Doctor = null; }
private void attach_LabOrders(LabOrder entity) { this.SendPropertyChanging(); entity.Doctor = this; }