partial void DeleteHospital(Hospital instance);
partial void InsertHospital(Hospital instance);
partial void UpdateHospital(Hospital instance);
protected void AddNewDrug_Click(object sender, EventArgs e) { if (IsValid) { TableAddDrug.Visible = false; String name = DrugName.Text; String address = Unit.Text; String license = GroupID.Text; var drug = new Hospital() { Name = name, Address = address, License = license }; DataBaseAllDataContext dataAll = new DataBaseAllDataContext(); dataAll.Hospitals.InsertOnSubmit(drug); dataAll.SubmitChanges(); ViewState["state"] = "load"; GridDrug.DataBind(); TableAddDrug.Visible = false; GridDrug.Visible = true; } }