varlist=DAOHelp.GetDataBySQL<EnrollmentOrgPatient>($"SELECT a.*, b.Name,b.Birthday,b.CardType, b.CardNo,b.Education, b.Marriage,b.Nation, b.Tel1, b.Tel2, CASE b.Sex WHEN 1 THEN '男' WHEN 2 THEN '女' ELSE '' END AS Sex FROM Enrollment_OrgPatient a LEFT JOIN Base_Patient b ON a.PID = b.ID WHERE GroupID = {item.ID} AND OID = {item.OID}");
if(list.Count!=0)return;
if(list.Count!=0){
Global.Msg("info","当前分组已存在人员!");
return;
}
DAOHelp.ExecuteSql($"UPDATE ENROLLMENT_ORGGROUP SET Name= '{item.Name}', Description= '{item.Description}', Sex= '{item.Sex}', Marriage= '{item.Marriage}', AgeMin= {item.AgeMin}, AgeMax= {item.AgeMax}, Type= '{item.Type}' WHERE ID= {item.ID}",false);