//更新处方号和组号 public static bool UpdatePresNoAndGroupId(List <Prescription> data) { if (data.Count == 0) { return(true); } PrescripttionDataSource.UpdatePresNoAndGroupId(data); return(true); }
public static bool UpdatePresNoAndGroupId(List <Entity.Prescription> data) { if (PrescripttionDbHelper != null) { return(PrescripttionDbHelper.UpdatePresNoAndGroupId(data)); } else { List <string> sqllist = new List <string>(); for (int i = 0; i < data.Count; i++) { string strsql = @"UPDATE emrdb..DATA_PrescriptionDetail SET ListNO={1},GroupID={2} WHERE ID={0}"; strsql = string.Format(strsql, data[i].PresListId, data[i].PresNo, data[i].Group_Id); sqllist.Add(strsql); } MidDbHelper.ExecuteNonQuery(MidDbHelper.EmrSysID, sqllist); return(true); } }