public bool InsertCTBenhNhanMRIImage(CTBenhNhanMRIImage CTBenhNhanMRIImage) { DataClassesDataContext data = new DataClassesDataContext(Connection); data.CTBenhNhanMRIImages.InsertOnSubmit(CTBenhNhanMRIImage); try { data.SubmitChanges(); return(true); } catch (Exception e) { return(false); } }
public List <CTBenhNhanMRIImage> GetInfCTBenhNhanMRIImage() { List <CTBenhNhanMRIImage> listMRIImage = new List <CTBenhNhanMRIImage>(); for (int i = 0; i < gridView_MRI.DataRowCount; i++) { bool flag = (bool)(gridView_MRI.GetRowCellValue(i, "Select")); if (flag) { CTBenhNhanMRIImage cp = new CTBenhNhanMRIImage(); cp.IDMRIImage = (int)(gridView_MRI.GetRowCellValue(i, "Ma")); cp.IDCTBenhNhan = lblCTBenhNhan.Text; cp.TenMRIImage = gridView_MRI.GetRowCellValue(i, "Ten").ToString(); listMRIImage.Add(cp); } } return(listMRIImage); }