/// <summary>
        /// 处方模板另存为
        /// </summary>
        /// <param name="newMould">处方模板头信息</param>
        /// <param name="presList">处方明细信息</param>
        /// <returns>true成功</returns>
        public bool AsSavePresTemplate(OPD_PresMouldHead newMould, List <OPD_PresDetail> presList)
        {
            BindDb(newMould);
            int mouId = newMould.save();

            foreach (OPD_PresDetail pres in presList)
            {
                OPD_PresMouldDetail newDetail  = new OPD_PresMouldDetail();
                OPD_PresDetail      presDetail = NewDao <IOPDDao>().GetPresDetail(pres.PresDetailID);
                newDetail.PresMouldHeadID = mouId;
                newDetail.PresNO          = 1;
                newDetail.Price           = presDetail.Price;
                newDetail.ChargeAmount    = presDetail.ChargeAmount;
                newDetail.ChannelID       = presDetail.ChannelID;
                newDetail.Days            = presDetail.Days;
                newDetail.Dosage          = presDetail.Dosage;
                newDetail.DosageUnit      = presDetail.DosageUnit;
                newDetail.DoseNum         = presDetail.DoseNum;
                newDetail.Entrust         = presDetail.Entrust;
                newDetail.ExecDeptID      = presDetail.ExecDeptID;
                newDetail.Factor          = presDetail.Factor;
                newDetail.FrequencyID     = presDetail.FrequencyID;
                newDetail.GroupID         = presDetail.GroupID;
                newDetail.GroupSortNO     = presDetail.GroupSortNO;
                newDetail.ItemID          = presDetail.ItemID;
                newDetail.ItemName        = presDetail.ItemName;
                newDetail.PresAmount      = presDetail.PresAmount;
                newDetail.PresAmountUnit  = presDetail.PresAmountUnit;
                newDetail.PresFactor      = presDetail.PresFactor;
                newDetail.Spec            = presDetail.Spec;
                newDetail.StatID          = presDetail.StatID;
                BindDb(newDetail);
                newDetail.save();
            }

            return(true);
        }
示例#2
0
 /// <summary>
 /// 保存模板
 /// </summary>
 /// <param name="info">模板头信息</param>
 /// <param name="resFlag">1成功</param>
 /// <returns>模板信息</returns>
 public OPD_PresMouldHead SaveMouldInfo(OPD_PresMouldHead info, out int resFlag)
 {
     this.BindDb(info);
     resFlag = info.save();
     return(info);
 }