public CTBenhNhan GetInfCTBenhNhan() { CTBenhNhan ctBN = new CTBenhNhan(); ctBN.IDCTBenhNhan = txtFileNumberPatient.Text + random.Next(5200); lblCTBenhNhan.Text = ctBN.IDCTBenhNhan; ctBN.Comment = txtComment.Text; ctBN.IDBenhNhan = txtFileNumberPatient.Text; ctBN.NgayKham = DateTime.Now; ctBN.NoiKham = "HN"; ctBN.TreatmentTime = spin_TreamentWeek.Text; ctBN.TreatmentTimeFor=spin_TreamentMonth.Text; ctBN.TreatmentTimeTotal = int.Parse(lblTotalTreament.Text); return ctBN; }
public bool InsertCTBenhNhan(CTBenhNhan CTBenhNhan) { DataClassesDataContext data = new DataClassesDataContext(Connection); data.CTBenhNhans.InsertOnSubmit(CTBenhNhan); try { data.SubmitChanges(); return true; } catch (Exception e) { return false; } }
partial void DeleteCTBenhNhan(CTBenhNhan instance);
partial void UpdateCTBenhNhan(CTBenhNhan instance);
partial void InsertCTBenhNhan(CTBenhNhan instance);