/// <summary> /// 添加 细菌 结果 /// </summary> /// <param name="SQLlist"></param> private void InsertMicorgresult(SortedList SQLlist, DataTable dtMicorg, DataTable dtmicanti, DataRow dr) { //先删子表 再删主表 SQLlist.Add(new Hashtable() { { "DELETE", "DeleteDAMicantiresultByRequestCode" } }, dr["RequestCode"]); SQLlist.Add(new Hashtable() { { "DELETE", "DeleteDAMicorgresultByRequestCode" } }, dr["RequestCode"]); //无数据返回 if (dtMicorg == null) { return; } for (int i = 0; i < dtMicorg.Rows.Count; i++) { DataRow drmicorg = dtMicorg.Rows[i]; DAMicorgresult _micorgresult = new DAMicorgresult(); _micorgresult.Micorgresultid = micorgresultbll.GetMicorgResultID(); _micorgresult.Requestcode = dr["RequestCode"].ToString(); if (dr["HospSampleID"] != DBNull.Value && dr["HospSampleID"].ToString() != string.Empty) { _micorgresult.Hospsampleid = dr["HospSampleID"].ToString(); } else if (dr.Table.Columns.Contains("HospSampleNumber") && dr["HospSampleNumber"] != DBNull.Value && dr["HospSampleNumber"].ToString() != string.Empty) { _micorgresult.Hospsamplenumber = dr["HospSampleNumber"].ToString(); } if (dtMicorg.Columns.Contains("EngOrgName") && drmicorg["EngOrgName"] != DBNull.Value) { _micorgresult.Engorgname = drmicorg["EngOrgName"].ToString(); } if (dtMicorg.Columns.Contains("OrganismCode") && drmicorg["OrganismCode"] != DBNull.Value) { _micorgresult.Organismcode = drmicorg["OrganismCode"].ToString(); } if (dtMicorg.Columns.Contains("OrganismName") && drmicorg["OrganismName"] != DBNull.Value) { _micorgresult.Organismname = drmicorg["OrganismName"].ToString(); } if (dtMicorg.Columns.Contains("Tips") && drmicorg["Tips"] != DBNull.Value) { _micorgresult.Tips = drmicorg["Tips"].ToString(); } if (dtMicorg.Columns.Contains("Quantity") && drmicorg["Quantity"] != DBNull.Value) { _micorgresult.Quantity = drmicorg["Quantity"].ToString(); } if (dtMicorg.Columns.Contains("QuantityComment") && drmicorg["QuantityComment"] != DBNull.Value) { _micorgresult.Quantitycomment = drmicorg["QuantityComment"].ToString(); } if (dtMicorg.Columns.Contains("displayorder") && drmicorg["displayorder"] != DBNull.Value) { _micorgresult.Displayorder = Convert.ToDecimal(drmicorg["displayorder"]); } if (dtMicorg.Columns.Contains("ReportOption") && drmicorg["ReportOption"] != DBNull.Value) { _micorgresult.Reportoption = drmicorg["ReportOption"].ToString(); } //获取细菌的药敏 DataRow[] drs = dtmicanti.Select("dictorganismid=" + drmicorg["dictorganismid"]); InsertMicantiResult(SQLlist, drs, dr, _micorgresult.Micorgresultid); SQLlist.Add(new Hashtable() { { "INSERT", "InsertDAMicorgresult" } }, _micorgresult); } }
/// <summary> /// 修改细菌结果记录 /// </summary> /// <param name="user"></param> /// <returns></returns> public int UpdateDAMicorgresultInfo(DAMicorgresult config) { return(service.update("UpdateDAMicorgresult", config)); }
/// <summary> /// 删除细菌结果记录 /// </summary> /// <param name="user"></param> /// <returns></returns> public object DeleteDAMicorgresult(DAMicorgresult config) { return(service.insert("DeleteDAMicorgresult", config)); }
/// <summary> /// 添加细菌结果记录 /// </summary> /// <param name="user"></param> /// <returns></returns> public object InsertDAMicorgresultInfo(DAMicorgresult config) { return(service.insert("InsertDAMicorgresult", config)); }