private void metroButton1_Click(object sender, EventArgs e) { PatientInformationDataContext MDC = new PatientInformationDataContext(@"Data Source=(LocalDB)\v11.0;AttachDbFilename=C:\Users\eajajul\Documents\Visual Studio 2012\Projects\UserHospital\UserHospital\DB.mdf;Integrated Security=True;Connect Timeout=30"); PatientData a = new PatientData(); a.PregDate = PRegDate.Value.Date.ToString(); a.Pname = PName.Text; a.Pgender = PGender.SelectedItem.ToString(); a.Pdob = PDob.Value.Date.ToString(); a.Poccupation = POccupation.Text; a.PmaritialStatus = PMaritialstatus.SelectedItem.ToString(); a.Page = metroTextBox1.Text; a.PbloodGroup = PBloodGroup.SelectedItem.ToString(); a.Paddress = PAddress.Text; a.Pcity = PCity.Text; a.PcontactNo = PContactNo.Text; a.Pcountry = PContactNo.Text; a.Pdepartment = PDepartment.SelectedItem.ToString(); a.PconsultantName = PConsulant.SelectedItem.ToString(); MDC.PatientDatas.InsertOnSubmit(a); MDC.SubmitChanges(); }
partial void DeletePatientData(PatientData instance);
partial void UpdatePatientData(PatientData instance);
partial void InsertPatientData(PatientData instance);