///// <summary> ///// 查询所有调剂信息 ///// </summary> ///// <param name="status">0未完成,1已完成,2全部</param> ///// <param name="begindate">开始日期</param> ///// <param name="enddate">结束日期</param> ///// <param name="eName">员工姓名</param> ///// <returns>DataTable对象</returns> public DataTable findRecipeInfo(int status, string begindate, string enddate, string eName) { string sql = "select max(id) as id,SwapPer,convert(varchar, wordDate, 111) as wordDate,'调剂' AS wordcontent, count(wordDate) as workload from adjust as a where 1=1"; if (status != 2) { sql += " and a.status=" + status; } if (begindate != null && begindate.Length > 0) { DateTime d = Convert.ToDateTime(begindate); string strB = d.ToString("yyyy/MM/dd 00:00:00"); sql += " and a.wordDate>='" + strB + "'"; } if (enddate != null && enddate.Length > 0) { DateTime d4 = Convert.ToDateTime(enddate); string strE = d4.ToString("yyyy/MM/dd 23:59:59"); sql += " and a.wordDate<='" + strE + "'"; } if (eName != null && eName.Length > 0) { sql += " and a.SwapPer='" + eName + "'"; } sql += "GROUP BY SwapPer,CONVERT(varchar, wordDate, 111)"; DataTable dt = db.get_DataTable(sql); return(dt); }
public DataTable GetScreenWarn(string date, int id) { string strSql = @"select s.* ,h.Hname as hospitalName from Hospital h left join ScreenWarn s on s.hospitalID = h.ID where warnDate='" + date + "' and s.hospitalID = " + id; DataTable dt = db.get_DataTable(strSql); return(dt); }
public DataTable findDrugAdinByDrugCode(string drugCode) { string sql = "select * from DrugAdmin where DrugCode='" + drugCode + "'"; DataTable dt = db.get_DataTable(sql); return(dt); }
///// <summary> ///// 查询复核信息 ///// </summary> ///// <returns>DataTable对象</returns> public DataTable findRecheckedInfo(int userid, string date, string hospital_name) { string sql = ""; string flag = ""; flag = db.get_role_by_userid(userid); string sql_1 = ""; if (hospital_name != "0") { sql_1 = "'" + hospital_name.Replace("_", "','") + "'"; } else { sql_1 = "select id from hospital"; } if (flag != "0") { sql = "select p.ID,p.Pspnum,p.customid,p.delnum,p.Hospitalid,p.name,p.sex,p.age,p.phone,p.address,p.department,p.inpatientarea,p.ward,p.sickbed,(select hnum from hospital as h where h.id = p.hospitalid) as hnum,(select hname from hospital as h where h.id = p.hospitalid) as hname," + "p.diagresult,p.dose,p.takenum,p.getdrugtime,p.getdrugnum,p.takemethod,p.decscheme,p.oncetime,p.twicetime,p.packagenum,p.dotime,p.doperson,(select count(*) from drug as d where d.pid = p.id) as drugnum,p.dtbcompany,p.dtbaddress,p.dtbphone,p.dtbtype,p.soakwater,p.soaktime,p.labelnum,p.remark,p.doctor,p.footnote,p.ordertime,p.curstate" + ",r.id as rid,r.AuditStatus rstatus,r.AuditTime rwordDate,r.imgname rimgname from prescription as p inner join Audit r on p.id=r.pid left join hospital hs on hs.id = p.hospitalid where r.employeeId=" + userid + " and CONVERT(varchar, r.AuditTime, 120) like '%" + date + "%' " + " and hs.id in(" + sql_1 + ")" + " order by r.AuditTime desc"; } else { sql = "select p.ID,p.Pspnum,p.customid,p.delnum,p.Hospitalid,p.name,p.sex,p.age,p.phone,p.address,p.department,p.inpatientarea,p.ward,p.sickbed,(select hnum from hospital as h where h.id = p.hospitalid) as hnum,(select hname from hospital as h where h.id = p.hospitalid) as hname," + "p.diagresult,p.dose,p.takenum,p.getdrugtime,p.getdrugnum,p.takemethod,p.decscheme,p.oncetime,p.twicetime,p.packagenum,p.dotime,p.doperson,(select count(*) from drug as d where d.pid = p.id) as drugnum,p.dtbcompany,p.dtbaddress,p.dtbphone,p.dtbtype,p.soakwater,p.soaktime,p.labelnum,p.remark,p.doctor,p.footnote,p.ordertime,p.curstate" + ",r.id as rid,r.AuditStatus rstatus,r.AuditTime rwordDate,r.imgname rimgname from prescription as p inner join Audit r on p.id=r.pid left join hospital hs on hs.id = p.hospitalid where " + " CONVERT(varchar, r.AuditTime, 120) like '%" + date + "%' " + " and hs.id in(" + sql_1 + ")" + " order by r.AuditTime desc"; } DataTable dt = db.get_DataTable(sql); return(dt); }
public int updateBubble(int id, int status, string endDate, string starttime) { DateTime d1 = Convert.ToDateTime(endDate); //当前时间 DateTime d2 = Convert.ToDateTime(starttime); //开始时间 TimeSpan d3 = d1.Subtract(d2); //泡药时间 int doingtime = Convert.ToInt32(d3.Days.ToString()) * 24 * 60 + Convert.ToInt32(d3.Hours.ToString()) * 60 + Convert.ToInt32(d3.Minutes.ToString()); //转化为分钟数 string sql = "update bubble set bubblestatus='" + status + "',endDate='" + endDate + "',doingtime='" + doingtime + "' where id=" + id; int count = db.cmd_Execute(sql); if (count > 0) { string sql4 = "select pid from bubble where id=" + id; DataTable dt4 = db.get_DataTable(sql4); if (dt4.Rows.Count > 0) { string machineid = distributionmachine(); string str3 = "insert into tisaneunit(pid,machineid) values('" + dt4.Rows[0]["pid"].ToString() + "','" + machineid + "')"; if (db.cmd_Execute(str3) == 1) { string sql7 = "update prescription set curstate = '泡药完成' where id = '" + dt4.Rows[0]["pid"].ToString() + "'"; db.cmd_Execute(sql7);//更新处方表里的当前状态 } } } return(count); }
public DataTable finRecipientInfo(string ClearPName) { string sql = "select * from Recipient where 1=1"; if (ClearPName != "0" && ClearPName != "") { sql += "and ClearPName ='" + ClearPName + "'"; } return(db.get_DataTable(sql)); }
///// <summary> ///// 根据处方号查询药品信息 ///// </summary> ///// <param name="pspnum">处方号</param> ///// <returns>DataTable对象</returns> public DataTable findDrugByPid(string pid) { string sql = "select ID,delnum,(select hnum from hospital as h where h.id = d.hospitalid) as hnum,(select hname from hospital as h where h.id = d.hospitalid) as hname," + "Pspnum,Drugnum,Drugname,DrugDescription,DrugPosition,DrugAllNum,DrugWeight,TieNum,Description,WholeSalePrice,RetailPrice,WholeSaleCost,retailpricecost," + "money,Fee from drug as d where pid='" + pid + "'"; DataTable dt = db.get_DataTable(sql); return(dt); }
///// <summary> ///// 查询复核信息 ///// </summary> ///// <returns>DataTable对象</returns> public DataTable findRecheckedInfo(int userid, string date) { string sql = "select p.ID,p.Pspnum,p.customid,p.delnum,p.Hospitalid,p.name,p.sex,p.age,p.phone,p.address,p.department,p.inpatientarea,p.ward,p.sickbed,(select hnum from hospital as h where h.id = p.hospitalid) as hnum,(select hname from hospital as h where h.id = p.hospitalid) as hname," + "p.diagresult,p.dose,p.takenum,p.getdrugtime,p.getdrugnum,p.takemethod,p.decscheme,p.oncetime,p.twicetime,p.packagenum,p.dotime,p.doperson,(select count(*) from drug as d where d.pid = p.id) as drugnum,p.dtbcompany,p.dtbaddress,p.dtbphone,p.dtbtype,p.soakwater,p.soaktime,p.labelnum,p.remark,p.doctor,p.footnote,p.ordertime,p.curstate" + ",r.id as rid,r.AuditStatus rstatus,r.AuditTime rwordDate,r.imgname rimgname from prescription as p inner join Audit r on p.id=r.pid where r.employeeId=" + userid + " and CONVERT(varchar, r.AuditTime, 120) like '%" + date + "%' order by p.ID desc"; DataTable dt = db.get_DataTable(sql); return(dt); }
//根据指定煎药室和包装室和每页显示数量获取分页数据 /* public DataTable get_devices_all_by_param(string jy_room, string bz_room, string pages,string p_rows) * { * string sql = "select top "+p_rows+" r.* from "+"(select top 100 percent row_number() over(order by m.m_id asc ) as rid,"+ * "m.machinename as 设备名称, m.status as 设备工作状态, m.usingstatus as 启用状态 from machine m "+ * "where m.mark in('0','1') "+ * "order by m.m_id asc) r "+ * "where r.rid>("+pages.Trim()+"-1)*"+p_rows.Trim(); * return db.get_DataTable(sql); * }*/ public DataTable get_devices_all_by_param(string jy_room, string pages, string p_rows) { string sql = "select top " + p_rows + " r.* from " + "(select top 100 percent row_number() over(order by m.m_id asc ) as 序号," + "m.machinename as 设备名称, m.status as 设备工作状态, m.usingstatus as 启用状态 pr.Pspnum as 处方号,SUBSTRING(isnull(pr.name,''),1,1)+'**' as 患者姓名," + "pr.curstate as 处方状态,ti.starttime as 开始时间,isnull(ti.tisaneman,'') as 操作人 from machine m left join prescription pr " + "on m.pid=pr.id left join tisaneinfo ti on ti.pid =m.pid " + "where m.mark in('0','1') " + " and m.roomnum='" + jy_room.Trim() + "'" + "order by m.m_id asc) r " + "where r.序号>(" + pages.Trim() + "-1)*" + p_rows.Trim(); return(db.get_DataTable(sql)); }
///// <summary> ///// 查询未审核和未匹配处方药品信息 ///// </summary> ///// <param name="hospitalId">医院id</param> ///// <param name="Pspnum">处方号</param> ///// <returns>SqlDataReader对象</returns> public DataTable findNotCheckAndMatchRecipeDrugInfo(string drugnum) { string sql = "SELECT DISTINCT p.ID AS pspId, p.Pspnum AS pspNum,(SELECT Hname FROM Hospital AS h WHERE (ID = p.Hospitalid)) AS hospitalName, p.Hospitalid AS hospitalId, d.ID AS drugId, d.drugnum AS hdrugNum, " + " d.drugname AS hdrugName, d.drugallnum AS hdrugTotal FROM prescription AS p LEFT OUTER JOIN PrescriptionCheckState AS pcs ON p.ID = pcs.prescriptionId RIGHT OUTER JOIN " + " (SELECT ID,pid, customid, delnum, Hospitalid, Pspnum, drugnum, drugname, drugdescription, drugposition, drugallnum, drugweight, tienum, description, wholesaleprice, retailprice, wholesalecost, retailpricecost, money, " + " fee FROM drug WHERE (drugnum = '" + drugnum + "')) AS d ON d.pid = p.id LEFT OUTER JOIN DrugMatching AS dm ON d.ID = dm.drugId AND dm.pspId = p.ID " + " WHERE (pcs.prescriptionId IS NULL) AND (dm.drugId IS NULL) AND (d.ID IS NOT NULL) AND (p.ID IS NOT NULL) AND (p.Hospitalid IS NOT NULL)"; DataTable dt = db.get_DataTable(sql); return(dt); }
public int AddReconciliation1(string Clearing, string ReconciliaT, string ReconciliaPer, string Remarks, string nPId, string now, string Retime) { String strSql = ""; int end = 0; string sum = ""; //处方下药品的零售价之和 string cheng = ""; //处方(次数*贴数)之积 //计算处方下药品的零售价之和 // string sq3 = " SELECT SUM(cast(retailprice as float(2))) AS a FROM drug AS d WHERE (pid ='" + nPId + "')"; //计算处方下匹配药品的零售价之和 string sq3 = "SELECT SUM(CAST(ad.Univalent AS float(2))) AS a FROM drug AS d INNER JOIN " + " ypcDrug AS ypc ON ypc.drugName = d.drugname AND ypc.drugNum = d.drugnum INNER JOIN " + " DrugAdmin AS ad ON ad.DrugName = ypc.drugDetailedName AND ad.DrugCode = ypc.drugAlias " + " WHERE (d.pid = '" + nPId + "')"; SqlDataReader srd = db.get_Reader(sq3); if (srd.Read()) { sum = srd["a"].ToString(); //计算处方(次数*贴数)之积 string sq4 = " SELECT dose * takenum AS m FROM prescription AS p WHERE (ID = '" + nPId + "')"; SqlDataReader srd1 = db.get_Reader(sq4); if (srd1.Read()) { cheng = srd1["m"].ToString(); } } strSql = "select pid from Reconciliation where pid=" + nPId; DataTable dt = db.get_DataTable(strSql); if (dt.Rows.Count == 0) { // Clearing:结算方 CheckNum:对账单号 ReconciliaPer:对账人 ReconciliaT:对账时间 now:生成对账单时间 State:对账单状态 0 未结算 1结算 drugMonSum:处方下药品的零售价之和 shengRe:处方(次数*贴数)之积 strSql = "insert into Reconciliation(Clearing,CheckNum,ReconciliaPer,ReconciliaT,now,State,Remarks,pid,drugMonSum,shengRe) "; strSql += "values ('" + Clearing + "','" + Retime + "','" + ReconciliaPer + "','" + ReconciliaT + "','" + now + "','0','" + Remarks + "','" + nPId + "','" + sum + "','" + cheng + "')"; if (strSql == "") { end = 0; } else { end = db.cmd_Execute(strSql); // string sq3 = "SELECT CheckNum, (SELECT SUM(retailprice) AS Expr1 FROM drug AS d WHERE (pid ='" + nPId + "')) AS b, (SELECT dose * takenum AS m" // + " FROM prescription AS p WHERE (ID = '" + nPId + "')) AS a FROM Reconciliation AS r"; } } return(end); }
public DataTable findRecipeInfo() { string sql = "select '调剂' AS wordcontent,convert(varchar, wordDate, 111) as wordDate,sum(cast(workload as int)) AS workload from adjust as a left join employee as e on a.employeeId=e.id where 1=1 GROUP BY CONVERT(varchar, a.wordDate, 111)"; DataTable dt = db.get_DataTable(sql); return(dt); }
public DataTable finLossiInfor(string Type) { string strSQL = "select id,Warehouse,productbatch,(select drugname from drugadmin where productbatch = l.productbatch) as dname,(select drugcode from drugadmin where productbatch = l.productbatch) as dcode,Type,lossnum,Per,time,Reason,remark from LossiInfor as l where 1=1 "; if (Type != "0" && Type != "") { strSQL += "and Type ='" + Type + "'"; } strSQL += "order by time desc"; DataTable dt = db.get_DataTable(strSQL); return(dt); }
public DataTable findDeliveryInfoDao(string Sendstate, string SendTime, string Sendpersonnel) { DataBaseLayer db = new DataBaseLayer(); System.DateTime currentTime = new System.DateTime(); currentTime = System.DateTime.Now;//获取当前时间 //string sql = "select d.DecoctingNum , d.ID,d.Sendpersonnel ,d.warningstatus,d.SendTime,d.Sendstate,d.Starttime,d.Remarks, p.customid,p.delnum,(select hnum from hospital as h where h.id = p.hospitalid) as hnum,(select hname from hospital as h where h.id = p.hospitalid) as hname,p.Hospitalid,p.name,p.sex,p.age,p.phone,p.address,p.department,p.inpatientarea,p.ward,p.sickbed,"; // sql += "p.diagresult,p.Pspnum,(select machinename from machine where id = (select machineid from tisaneinfo where pid = p.id )) as machineid,p.dose,p.takenum,p.getdrugtime,p.getdrugnum,p.takemethod,p.decscheme,p.oncetime,p.RemarksA,p.RemarksB,p.twicetime,p.packagenum,p.dotime,p.doperson,p.dtbcompany,p.dtbaddress,p.dtbphone,p.dtbtype,p.soakwater,p.soaktime,p.labelnum,p.remark,p.doctor,p.footnote,p.ordertime,p.curstate"; // sql += " from prescription as p join Delivery as d on p.id =d.DecoctingNum where d.DecoctingNum not in (select pid from InvalidPrescription) "; string sql = "select d.DecoctingNum , d.ID,d.Sendpersonnel ,d.SendTime,case d.Sendstate when '0' then '待发货' when '1' then '已发货' else d.Sendstate end,d.Remarks,(select hnum from hospital as h where h.id = p.hospitalid) as hnum,(select hname from hospital as h where h.id = p.hospitalid) as hname,"; sql += "p.Pspnum,p.name,(select machinename from machine where id = (select machineid from tisaneinfo where pid = p.id )) as machineid,p.dose,p.takenum,p.packagenum,p.dtbaddress,p.getdrugtime,p.getdrugnum"; sql += " from prescription as p join Delivery as d on p.id =d.DecoctingNum where d.DecoctingNum not in (select pid from InvalidPrescription) "; if (Sendstate != "") { sql += " and Sendstate ='" + Sendstate + "'"; } if (SendTime != "0") { sql += "and Convert(varchar,SendTime ,120) like '" + SendTime + "%'"; } if (Sendpersonnel != "0") { sql += "and Sendpersonnel='" + Sendpersonnel + "'"; } sql += " order by d.DecoctingNum desc"; DataTable dt = db.get_DataTable(sql); return(dt); }
public DataTable searchTisaneClass() { string strSQL = "select id,pspnum,tisaneclassid,pspstate,remark from TisaneClassDst"; DataTable dt = db.get_DataTable(strSQL); return(dt); }
public DataTable GetPsTableById(int pid) { string strSql = @"select * from prescriptionSubsidiary where pid=" + pid; DataTable dt = db.get_DataTable(strSql); return(dt); }
public DataTable SearchInfo(string aPid) { DataBaseLayer db = new DataBaseLayer(); string strSql = "select r.id , r.Clearing,r.CheckNum,r.ReconciliaPer,r.ReconciliaT,r.now,r.State,r.Remarks,p.dotime,(select distinct hname from hospital as h where h.id = p.hospitalid and h.id in (select hospitalid from prescription where p.id = r.pid )) as hname,p.Pspnum,p.decscheme,p.name,p.dose,p.takenum,p.packagenum, (select count(pid) from drug as s where s.pid =p.id and s.pid=r.pid ) as DrugAcount" + " from prescription as p join Reconciliation as r on p.id = r.pid where 1=1"; string[] strRows1Id1 = aPid.Split(','); if (strRows1Id1.Length == 1) { strSql += " and r.pid = " + strRows1Id1[0] + ""; } else { for (int i = 0; i < strRows1Id1.Length; i++) { if (i == 0) { strSql += " and r.pid in(" + strRows1Id1[i] + ","; } else if (i == strRows1Id1.Length - 1) { strSql += strRows1Id1[i] + ")"; } else { strSql += strRows1Id1[i] + ","; } } } DataTable dt = db.get_DataTable(strSql); return(dt); }
///// <summary> ///// 更新复核信息 ///// </summary> ///// <param name="hid">医院id</param> ///// <returns>int对象</returns> public int getEntrustNumber(int hid) { string sql = "select id,entrustNumber,updateDate from entrustNumber where Hospitalid=" + hid; string nowDate = DateTime.Now.ToString("yyyyMM"); DataTable dt = db.get_DataTable(sql); if (dt.Rows.Count > 0) { string updateDate = dt.Rows[0]["updateDate"].ToString(); string id = dt.Rows[0]["id"].ToString(); int entrustNumber = Convert.ToInt32(dt.Rows[0]["entrustNumber"].ToString()); if (!updateDate.Equals(nowDate)) { entrustNumber++; string updateSql = "update entrustNumber set entrustNumber=" + entrustNumber + ",updateDate='" + nowDate + "' where id=" + id; db.cmd_Execute(updateSql); } return(entrustNumber); } else { string sqlStr = "insert into entrustNumber(Hospitalid,entrustNumber,updateDate) values('" + hid + "','1','" + nowDate + "')"; db.cmd_Execute(sqlStr); } return(1); }
public DataTable AdjustMonitors_1() { System.DateTime currentTime = new System.DateTime(); currentTime = System.DateTime.Now;//当前时间 string strS = currentTime.ToString("yyyy/MM/dd 00:00:00"); string strS2 = currentTime.ToString("yyyy/MM/dd 23:59:59"); DataBaseLayer db = new DataBaseLayer(); string sql = @" select p.id,h.Hname,p.name,a.SwapPer,p.dotime,a.wordDate,a.status from prescription as p right join adjust as a on p.ID=a.prescriptionId left join Hospital as h on h.ID=p.Hospitalid and h.DrugSendDisplayState='0' where p.curstate in('开始调剂','调剂完成') and p.ID not in (select pid from Audit ) and p.dotime >='" + strS + "' and p.dotime<='" + strS2 + "'"; db.write_log_txt("调剂大屏显示SQL:" + sql); DataTable dt = db.get_DataTable(sql); return(dt); }
public string finDecotingBarbyId(int id) { /* //通过id查询煎药条码 * string strSql = "select (select RIGHT(CAST('0' + RTRIM(dose *takenum ) AS varchar(20)), 2) as b from prescription as p where p.id in (select DecoctingNum from Delivery as d where id = " + id + ") ) as packNum ," +"(select RIGHT(CAST('0' + RTRIM(decscheme) AS varchar(20)), 2) as b from prescription as p where p.id in (select DecoctingNum from Delivery as d where id = " + id + ") ) as DeScheme, " +"(select RIGHT(CAST('000' + RTRIM( packagenum ) AS varchar(20)), 4) as b from prescription as p where p.id in (select DecoctingNum from Delivery as d where id = " + id + ") ) as packAcount ," + "(select RIGHT(CAST('0' + RTRIM( oncetime) AS varchar(20) ), 2) as b from prescription as p where p.id in (select DecoctingNum from Delivery as d where id = " + id + ") ) as OTime ," + "(select RIGHT(CAST('0' + RTRIM( twicetime ) AS varchar(20)), 2) as b from prescription as p where p.id in (select DecoctingNum from Delivery as d where id = " + id + ") ) as TTime ," + "(select RIGHT(CAST('0' + RTRIM( machineid ) AS varchar(20)), 2) as b from tisaneinfo as t where t.pid in (select DecoctingNum from Delivery as d where id = " + id + ") ) as hao ," + + " RIGHT(CAST('000000000' + RTRIM(DecoctingNum) AS varchar(20)), 10) as bNum , DecoctingNum from Delivery as d where id = " + id;*/ //通过煎药单号查询煎药条码,下面id获取的是煎药单号 string strSql = "select (select RIGHT(CAST('0' + RTRIM(dose *takenum ) AS varchar(20)), 2) as b from prescription as p where p.id = " + id + ") as packNum ," + "(select RIGHT(CAST('0' + RTRIM(decscheme) AS varchar(20)), 2) as b from prescription as p where p.id = " + id + ") as DeScheme, " + "(select RIGHT(CAST('000' + RTRIM( packagenum ) AS varchar(20)), 4) as b from prescription as p where p.id = " + id + ") as packAcount ," + "(select RIGHT(CAST('0' + RTRIM( oncetime) AS varchar(20) ), 2) as b from prescription as p where p.id = " + id + ") as OTime ," + "(select RIGHT(CAST('0' + RTRIM( twicetime ) AS varchar(20)), 2) as b from prescription as p where p.id = " + id + ") as TTime ," + "(select RIGHT(CAST('0' + RTRIM( machineid ) AS varchar(20)), 2) as b from tisaneinfo as t where t.pid = " + id + ") as hao ," + " RIGHT(CAST('000000000' + RTRIM(DecoctingNum) AS varchar(20)), 10) as bNum , DecoctingNum from Delivery as d where DecoctingNum = " + id; //包装袋数: packNum; 煎药方案: DeScheme; 煎药单号: bNum; 包装量: packAcount ;一煎时间:OTime; 二煎时间:TTime; 煎药单分配的机组号: hao DataTable dt = db.get_DataTable(strSql); //string a = dt.Rows[0]["packNum"].ToString(); //string b = dt.Rows[0]["DeScheme"].ToString(); // string c = dt.Rows[0]["bNum"].ToString(); // string y = dt.Rows[0]["hao"].ToString(); // string d = dt.Rows[0]["packAcount"].ToString(); // string r = dt.Rows[0]["OTime"].ToString(); // string m = dt.Rows[0]["TTime"].ToString(); // string k = dt.Rows[0]["Warehouse"].ToString(); return(dt.Rows[0]["packNum"].ToString() + dt.Rows[0]["DeScheme"].ToString() + dt.Rows[0]["bNum"].ToString() + dt.Rows[0]["packAcount"].ToString() + dt.Rows[0]["OTime"].ToString() + dt.Rows[0]["TTime"].ToString() + dt.Rows[0]["hao"].ToString()); }
public DataTable findHospitalInfo(int id) { string strSql = "select * from hospital where id = " + id; DataTable dt = db.get_DataTable(strSql); return(dt); }
public DataTable findWarehousepharmacyModelInfo(string Type) { string sql = "select * from Warehousepharmacy where 1=1"; if (Type != "0" && Type != "") { sql += "and Type ='" + Type + "'"; } // sql += " and id ='" + EName + "'"; DataTable dt = db.get_DataTable(sql); return(dt); }
public DataTable findspecialdrug() { string sql = "select * from specialdrugname"; DataTable dt = db.get_DataTable(sql); return(dt); }
public DataTable findHospitalInfo(int id) { string strSql = "select a.*,b.relation_name from hospital a left join tb_hospital_drug_type b on a.relation_drug_type_id=b.relation_id where a.id = " + id; DataTable dt = db.get_DataTable(strSql); return(dt); }
/// <summary> /// 显示信息 /// </summary> /// <param ></param> /// <returns></returns> public DataTable SearchPacking() { string strSql = "select id ,DecoctingNum,Pacpersonnel,PacTime,Fpactate,Starttime,Timeset from Packing"; DataBaseLayer db = new DataBaseLayer(); DataTable dt = db.get_DataTable(strSql); return(dt); }
public DataTable findLimitsauthorityById(int id) { DataBaseLayer db = new DataBaseLayer(); string strSql = "select * from limitsauthority where id=" + id; DataTable dt = db.get_DataTable(strSql); return(dt); }
public DataTable findPackingBybarcode(string barcode) { DataBaseLayer db = new DataBaseLayer(); string sql = "select * from packing where DecoctingNum='" + barcode + "'"; DataTable dt = db.get_DataTable(sql); return(dt); }
/// <summary> /// 显示信息 /// </summary> /// <param ></param> /// <returns></returns> public DataTable SearchDelivery() { string strSql = "select id ,DecoctingNum,Sendpersonnel,SendTime,Sendstate,Starttime,Remarks,kd_type,kd_num,demo from Delivery"; DataBaseLayer db = new DataBaseLayer(); DataTable dt = db.get_DataTable(strSql); return(dt); }
public DataTable find_pda_image_by_pid(string p_id) { DataBaseLayer db = new DataBaseLayer(); string sql = "select distinct n_id,image_str,syscreated,p_str,p_status from dbo.tb_node_image where n_id='" + p_id.Trim() + "'"; DataTable dt = db.get_DataTable(sql); return(dt); }
public DataTable getpackingInfo(int id) { string sql = "select DecoctingNum,Pacpersonnel,PacTime,Fpactate,Starttime,Timeset from packing where id = '" + id + "'"; DataBaseLayer db = new DataBaseLayer(); DataTable dt = db.get_DataTable(sql); return(dt); }