public bool HealthExamUpdate(HealthExamination entity) { try { HealthExamTable = db.GetTable <HealthExamination>(); HealthExamination model = HealthExamTable.SingleOrDefault(x => x.HealthExaminationID.Equals(entity.HealthExaminationID)); model.Date = entity.Date; model.Name = entity.Name; model.Place = entity.Place; model.Height = entity.Height; model.Weight = entity.Weight; model.Eyes = entity.Eyes; model.ENT = entity.ENT; model.Oral = entity.Oral; model.InternalMedicine = entity.InternalMedicine; model.Surgery = entity.Surgery; model.Dermatology = entity.Dermatology; model.BoneMuscle = entity.BoneMuscle; model.Nerve = entity.Nerve; model.Endocrine = entity.Endocrine; model.Status = entity.Status; db.SubmitChanges(); return(true); } catch { return(false); } }
public bool HealthExamInsert(HealthExamination entity) { try { HealthExamTable = db.GetTable <HealthExamination>(); HealthExamTable.InsertOnSubmit(entity); db.SubmitChanges(); return(true); } catch { return(false); } }
public bool HealthExamDelete(int HealthExaminationID) { try { HealthExamTable = db.GetTable <HealthExamination>(); HealthExamination model = HealthExamTable.SingleOrDefault(x => x.HealthExaminationID.Equals(HealthExaminationID)); model.Status = false; db.SubmitChanges(); return(true); } catch { return(false); } }