public List<CTBenhNhanConditionVertebral> GetInfCTBenhNhanConditionVertebral() { List<CTBenhNhanConditionVertebral> listConditionDicsJoint = new List<CTBenhNhanConditionVertebral>(); for (int i = 0; i < gridView_DiscJoint.DataRowCount; i++) { CTBenhNhanConditionVertebral cp = new CTBenhNhanConditionVertebral(); cp.IDCTBenhNhan = lblCTBenhNhan.Text; cp.Degenerative = (bool)(gridView_Vertebral.GetRowCellValue(i, "DegenerativeStenosis")); cp.Mild = (bool)(gridView_Vertebral.GetRowCellValue(i, "MidDegeneration")); cp.Vertebrae = gridView_Vertebral.GetRowCellValue(i, "Ten").ToString(); cp.Severe = (bool)(gridView_Vertebral.GetRowCellValue(i, "SevereDegeneration")); cp.Moderate = (bool)(gridView_Vertebral.GetRowCellValue(i, "ModerateDegeneration")); cp.Subluxation = (bool)(gridView_Vertebral.GetRowCellValue(i, "Subluxation")); if ((bool)cp.Subluxation) { cp.Innervation = gridView_Vertebral.GetRowCellValue(i, "Innervation").ToString(); cp.Possible = gridView_Vertebral.GetRowCellValue(i, "Possible").ToString(); } if ((bool)(cp.Mild)) cp.LevelDegeneration = "Mild"; else if ((bool)(cp.Moderate)) cp.LevelDegeneration = "Moderrate"; else if ((bool)(cp.Severe)) cp.LevelDegeneration = "Severe"; else cp.LevelDegeneration = "None"; if ((bool)cp.Degenerative || (bool)cp.Mild || (bool)cp.Severe || (bool)cp.Subluxation || (bool)cp.Moderate) { listConditionDicsJoint.Add(cp); } } return listConditionDicsJoint; }
partial void DeleteCTBenhNhanConditionVertebral(CTBenhNhanConditionVertebral instance);
public bool InsertCTBenhNhanConditionVertebral(CTBenhNhanConditionVertebral CTBenhNhanConditionVertebral) { DataClassesDataContext data = new DataClassesDataContext(Connection); data.CTBenhNhanConditionVertebrals.InsertOnSubmit(CTBenhNhanConditionVertebral); try { data.SubmitChanges(); return true; } catch (Exception e) { return false; } }
partial void InsertCTBenhNhanConditionVertebral(CTBenhNhanConditionVertebral instance);