/// <summary> /// 创建门诊退药明细列表 /// </summary> /// <param name="recipeOrder">发药明细表</param> /// <param name="dispMaster">发药表头</param> /// <param name="dispenseModel">发药模式</param> /// <returns>门诊退药明细列表</returns> public override List <BillOrder> BuildNewDispOrder(DataTable recipeOrder, YP_DRMaster dispMaster, int dispenseModel) { List <BillOrder> rtnList = new List <BillOrder>(); for (int index = 0; index < recipeOrder.Rows.Count; index++) { YP_DROrder refOrder = new YP_DROrder(); DataRow dRow = recipeOrder.Rows[index]; if (Convert.ToInt32(dRow["RefundNum"]) != 0 && Convert.ToInt32(dRow["DrugOC_Flag"]) == 1 && Convert.ToInt32(dRow["MasterDrugOCID"]) == dispMaster.MasterDrugOCID) { refOrder = (YP_DROrder)ApiFunction.DataTableToObject(recipeOrder, index, refOrder); refOrder.DrugOCNum = Convert.ToDecimal(dRow["RefundNum"]); refOrder.DeptID = dispMaster.DeptID; //退药部门ID refOrder.DrugOC_Flag = 0; //1表发药,0表退药 refOrder.MasterDrugOCID = 0; refOrder.Refundment_Flag = 1; //1表已退费,0表未退费 //零售金额 refOrder.RetailFee = refOrder.RetailFee * Convert.ToDecimal(dRow["RefundNum"]) / Convert.ToDecimal(dRow["DrugOCNum"]); //批发金额 refOrder.TradeFee = refOrder.TradeFee * Convert.ToDecimal(dRow["RefundNum"]) / Convert.ToDecimal(dRow["DrugOCNum"]); refOrder.DrugOCNum = Convert.ToDecimal(dRow["RefundNum"]); rtnList.Add(refOrder); } } return(rtnList); }
private YP_DRMaster GetDRMasterFromDt(int index) { if (index >= 0) { YP_DRMaster drMaster = new YP_DRMaster(); drMaster = (YP_DRMaster)ApiFunction.DataTableToObject(listMaster, index, drMaster); return(drMaster); } else { return(null); } }
/// <summary> /// 从规格信息表中获取规格对象 /// </summary> /// <param name="dtTable"> /// 规格信息表 /// </param> /// <param name="index"> /// 指定行记录索引 /// </param> /// <returns> /// 规格对象 /// </returns> private HIS.Model.YP_SpecDic GetSpecFromDt(DataTable dtTable, int index) { try { if (dtTable.Rows.Count < index || dtTable.Rows.Count == 0) { return(null); } YP_SpecDic currentSpecDic = new YP_SpecDic(); ApiFunction.DataTableToObject(dtTable, index, currentSpecDic); return(currentSpecDic); } catch (Exception error) { throw error; } }
/// <summary> /// 从出库明细信息表中读取出库明细对象 /// </summary> /// <param name="dtTable"> /// 出库明细信息表 /// </param> /// <param name="index"> /// 指定行记录索引 /// </param> /// <returns> /// 出库明细对象 /// </returns> private YP_OutOrder GetOutOrderFromDt(DataTable dtTable, int index) { try { if (dtTable.Rows.Count < index || dtTable.Rows.Count == 0) { return(null); } YP_OutOrder currentOutorder = new YP_OutOrder(); ApiFunction.DataTableToObject(dtTable, index, currentOutorder); return(currentOutorder); } catch (Exception error) { throw error; } }
//add 平级药房调拨 张运辉 [20100531] private YP_InOrder GetIntOrderFromDt(DataTable dtTable, int index) { try { if (dtTable.Rows.Count < index || dtTable.Rows.Count == 0) { return(null); } YP_InOrder currentIntorder = new YP_InOrder(); ApiFunction.DataTableToObject(dtTable, index, currentIntorder); currentIntorder.InNum = decimal.Parse(dtTable.Rows[index]["OUTNUM"].ToString()); return(currentIntorder); } catch (Exception error) { throw error; } }