コード例 #1
0
ファイル: svchms.cs プロジェクト: iamwsx05/hms
 /// <summary>
 /// 评估记录-保存
 /// </summary>
 /// <param name="pgData"></param>
 /// <param name="pgId"></param>
 /// <returns></returns>
 public int SaveGxyPgRecord(EntityGxyRecord gxyRecord, EntityGxyPg gxyPg, EntityGxyPgData pgData, out decimal pgId)
 {
     using (Biz205 biz = new Biz205())
     {
         return(biz.SaveGxyPgRecord(gxyRecord, gxyPg, pgData, out pgId));
     }
 }
コード例 #2
0
 /// <summary>
 /// ctor
 /// </summary>
 public frmPopup2050102(EntityGxyPg _pgVo)
 {
     InitializeComponent();
     this.Height = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height;
     if (!DesignMode)
     {
         this.lueEnaOper.LookAndFeel.UseDefaultLookAndFeel = false;
         this.lueEnaOper.LookAndFeel.SkinName = "Black";
         this.lueRecorder.LookAndFeel.UseDefaultLookAndFeel = false;
         this.lueRecorder.LookAndFeel.SkinName = "Black";
         this.pgVo = _pgVo;
     }
 }
コード例 #3
0
ファイル: biz205.cs プロジェクト: iamwsx05/hms
        /// <summary>
        /// 评估记录-保存
        /// </summary>
        /// <param name="pgData"></param>
        /// <param name="pgId"></param>
        /// <returns></returns>
        public int SaveGxyPgRecord(EntityGxyRecord gxyRecord, EntityGxyPg gxyPg, EntityGxyPgData pgData, out decimal pgId)
        {
            int affectRows = 0;

            pgId = 0;
            string    Sql = string.Empty;
            SqlHelper svc = null;
            decimal   id  = 0;

            try
            {
                svc = new SqlHelper(EnumBiz.onlineDB);
                List <DacParm> lstParm = new List <DacParm>();
                svc = new SqlHelper(EnumBiz.onlineDB);
                if (gxyPg.pgId <= 0)
                {
                    id                 = svc.GetNextID("gxyPg", "pgId");
                    gxyPg.status       = 1;
                    gxyPg.pgId         = id;
                    gxyPg.recordDate   = DateTime.Now;
                    gxyRecord.pgTimes += 1;
                    lstParm.Add(svc.GetInsertParm(gxyPg));

                    //高血压下次随访数据
                    string           sql   = @"update gxyRecord set pgTimes = ? where recId = ?";
                    IDataParameter[] param = svc.CreateParm(2);
                    param[0].Value = gxyRecord.pgTimes;
                    param[1].Value = gxyRecord.recId;
                    lstParm.Add(svc.GetDacParm(EnumExecType.ExecSql, sql, param));
                }
                else
                {
                    id = gxyPg.pgId;
                    lstParm.Add(svc.GetUpdateParm(gxyPg,
                                                  new List <string> {
                        EntityGxyPg.Columns.bloodPressLevel,
                        EntityGxyPg.Columns.dangerLevel,
                        EntityGxyPg.Columns.manageLevel,
                        EntityGxyPg.Columns.evaDate,
                    },
                                                  new List <string> {
                        EntityGxyPg.Columns.pgId
                    }));
                }
                pgData.pgId = id;
                //评估数据
                lstParm.Add(svc.GetDelParm(pgData, EntityGxyPgData.Columns.pgId));
                lstParm.Add(svc.GetInsertParm(pgData));
                if (lstParm.Count > 0)
                {
                    affectRows = svc.Commit(lstParm);
                }
                pgId = id;
            }
            catch (Exception e)
            {
                ExceptionLog.OutPutException(e);
                affectRows = -1;
            }
            finally
            {
                svc = null;
            }
            return(affectRows);
        }
コード例 #4
0
ファイル: biz205.cs プロジェクト: iamwsx05/hms
        /// <summary>
        /// 评估记录-获取
        /// </summary>
        /// <param name="parms"></param>
        /// <returns></returns>
        public List <EntityGxyPg> GetGxyPgRecords(List <EntityParm> parms)
        {
            List <EntityGxyPg> data = null;
            SqlHelper          svc  = new SqlHelper(EnumBiz.onlineDB);
            string             Sql  = string.Empty;

            Sql = @" select a.recId,
                           b.clientNo,
                           b.clientName,
                           b.gender,
                           b.birthday,
                           b.gradeName,
                           a.pgId,
                           a.bloodPressLevel,
                           a.dangerLevel,
                           a.manageLevel,
                           a.evaDate,
                           e.xmlData,
                           d.oper_name as pgRecorder
                      from gxyPg a
                     inner join gxyRecord c
                        on a.recId = c.recId 
					inner join V_ClientInfo  b
                        on c.clientNo = b.clientNo and c.regTimes = b.regTimes
                    left join gxyPgData e
						on a.pgId =  e.pgId
                    left join code_operator d
                        on a.evaluator = d.oper_code
                    where a.status = 1 ";

            DataTable dt = svc.GetDataTable(Sql);

            if (dt != null && dt.Rows.Count > 0)
            {
                data = new List <EntityGxyPg>();
                EntityGxyPg vo = null;
                foreach (DataRow dr in dt.Rows)
                {
                    vo       = new EntityGxyPg();
                    vo.pgId  = Function.Dec(dr["pgId"]);
                    vo.recId = Function.Dec(dr["recId"]);
                    Function.SetClientInfo(ref vo, dr);
                    vo.evaDateStr      = dr["evaDate"] == DBNull.Value ? "" : Function.Datetime(dr["evaDate"]).ToString("yyyy-MM-dd");
                    vo.bloodPressLevel = dr["bloodPressLevel"].ToString();
                    if (vo.bloodPressLevel == "1")
                    {
                        vo.bloodPressLevel = "正常血压";
                    }
                    if (vo.bloodPressLevel == "2")
                    {
                        vo.bloodPressLevel = "正常高值";
                    }
                    if (vo.bloodPressLevel == "3")
                    {
                        vo.bloodPressLevel = "一级高血压";
                    }
                    if (vo.bloodPressLevel == "4")
                    {
                        vo.bloodPressLevel = "二级高血压";
                    }
                    if (vo.bloodPressLevel == "5")
                    {
                        vo.bloodPressLevel = "三级高血压";
                    }
                    if (vo.bloodPressLevel == "6")
                    {
                        vo.bloodPressLevel = "单纯收缩期高血压";
                    }
                    vo.dangerLevel = dr["dangerLevel"].ToString();
                    if (vo.dangerLevel == "1")
                    {
                        vo.dangerLevel = "低危";
                    }
                    if (vo.dangerLevel == "2")
                    {
                        vo.dangerLevel = "中危";
                    }
                    if (vo.dangerLevel == "3")
                    {
                        vo.dangerLevel = "高危";
                    }
                    vo.manageLevel = dr["manageLevel"].ToString();
                    if (vo.manageLevel == "1")
                    {
                        vo.manageLevel = "一级管理";
                    }
                    if (vo.manageLevel == "2")
                    {
                        vo.manageLevel = "二级管理";
                    }
                    if (vo.manageLevel == "3")
                    {
                        vo.manageLevel = "三级管理";
                    }
                    vo.evaluator = dr["pgRecorder"].ToString();
                    vo.pgData    = dr["xmlData"].ToString();
                    data.Add(vo);
                }
            }
            return(data);
        }
コード例 #5
0
        /// <summary>
        /// SaveData
        /// </summary>
        /// <returns></returns>
        void SaveData()
        {
            if (pgVo == null)
            {
                pgVo       = new EntityGxyPg();
                pgVo.recId = gxyRecord.recId;
            }
            if (gxyRecord == null)
            {
                gxyRecord       = new EntityGxyRecord();
                gxyRecord.recId = pgVo.recId;
            }
            if (chkXyfj01.Checked == true)
            {
                pgVo.bloodPressLevel = "1";
            }
            if (chkXyfj02.Checked == true)
            {
                pgVo.bloodPressLevel = "2";
            }
            if (chkXyfj03.Checked == true)
            {
                pgVo.bloodPressLevel = "3";
            }
            if (chkXyfj04.Checked == true)
            {
                pgVo.bloodPressLevel = "4";
            }
            if (chkXyfj05.Checked == true)
            {
                pgVo.bloodPressLevel = "5";
            }
            if (chkXyfj06.Checked == true)
            {
                pgVo.bloodPressLevel = "6";
            }

            if (chkWxfc01.Checked == true)
            {
                pgVo.dangerLevel = "1";
            }
            if (chkWxfc02.Checked == true)
            {
                pgVo.dangerLevel = "2";
            }
            if (chkWxfc03.Checked == true)
            {
                pgVo.dangerLevel = "3";
            }

            if (chkManageLevel01.Checked == true)
            {
                pgVo.manageLevel = "1";
            }
            if (chkManageLevel02.Checked == true)
            {
                pgVo.manageLevel = "2";
            }
            if (chkManageLevel03.Checked == true)
            {
                pgVo.manageLevel = "3";
            }
            pgVo.evaluator = lueEnaOper.EditValue.ToString();
            pgVo.evaDate   = Function.Datetime(dteEnaDate.Text);
            pgData         = new EntityGxyPgData();
            pgData.xmlData = GetData();
            decimal pgId  = 0;
            bool    isNew = this.pgVo.pgId <= 0 ? true : false;

            using (ProxyHms proxy = new ProxyHms())
            {
                if (proxy.Service.SaveGxyPgRecord(this.gxyRecord, this.pgVo, this.pgData, out pgId) > 0)
                {
                    this.IsRequireRefresh = true;
                    if (isNew)
                    {
                        this.pgVo.pgId   = pgId;
                        this.pgData.pgId = pgId;
                    }

                    DialogBox.Msg("保存成功!");
                }
                else
                {
                    DialogBox.Msg("保存失败。");
                }
            }
        }