Exemplo n.º 1
0
        public DateTime GetServerDate()
        {
            string sql   = "select sysdate from dual";
            object value = _dbHelper.ExecuteSQLOneOutput(sql);

            return(value == null ? default(DateTime) : Convert.ToDateTime(value));
        }
Exemplo n.º 2
0
 public object ExecuteSqlOneOutput()
 {
     return(_dbHelper.ExecuteSQLOneOutput(this));
 }
Exemplo n.º 3
0
        private void LoadOneData()
        {
            int    intSelRow;
            string strTmp;

            if (gridView1.RowCount == 0)
            {
                return;
            }

            intSelRow = gridView1.GetSelectedRows()[0];
            if (intSelRow < 0)
            {
                return;
            }
            System.Diagnostics.Debug.WriteLine("LoadOneData step1");
            _studyInfo = new StudyInfo();


            //_studyInfo.ID = Convert.ToInt32("100");
            _studyInfo.ID     = Convert.ToInt64(gridView1.GetRowCellValue(intSelRow, "ID").ToString());
            _studyInfo.患者ID   = Convert.ToInt64(gridView1.GetRowCellValue(intSelRow, "患者ID").ToString());
            _studyInfo.执行科室ID = Convert.ToInt64(gridView1.GetRowCellValue(intSelRow, "执行科室ID").ToString());
            _studyInfo.检查项目ID = Convert.ToInt64(gridView1.GetRowCellValue(intSelRow, "检查项目ID").ToString());
            _studyInfo.患者来源   = gridView1.GetRowCellValue(intSelRow, "患者来源").ToString();

            strTmp = gridView1.GetRowCellValue(intSelRow, "主页ID").ToString();
            if (strTmp != "")
            {
                _studyInfo.主页ID = Convert.ToInt16(strTmp);
            }
            else
            {
                _studyInfo.主页ID = 0;
            }


            string str挂号ID = gridView1.GetRowCellValue(intSelRow, "挂号ID").ToString();

            if (_studyInfo.患者来源 == "1")
            {
                _studyInfo.就诊ID = str挂号ID;
            }
            else if (_studyInfo.患者来源 == "2")
            {
                _studyInfo.就诊ID = _studyInfo.主页ID.ToString();
            }
            else
            {
                _studyInfo.就诊ID = "";
            }


            _studyInfo.姓名 = gridView1.GetRowCellValue(intSelRow, "姓名").ToString();
            _studyInfo.性别 = gridView1.GetRowCellValue(intSelRow, "性别").ToString();
            _studyInfo.年龄 = gridView1.GetRowCellValue(intSelRow, "年龄").ToString();
            _studyInfo.身高 = "";    // gridView1.GetRowCellValue(intSelRow, "身高").ToString();
            _studyInfo.体重 = "";    // gridView1.GetRowCellValue(intSelRow, "体重").ToString();

            _studyInfo.住院号 = gridView1.GetRowCellValue(intSelRow, "住院号").ToString();
            _studyInfo.门诊号 = gridView1.GetRowCellValue(intSelRow, "门诊号").ToString();
            _studyInfo.检查号 = "";    // gridView1.GetRowCellValue(intSelRow, "检查号").ToString();

            _studyInfo.影像类别 = gridView1.GetRowCellValue(intSelRow, "影像类别").ToString();
            _studyInfo.执行科室 = gridView1.GetRowCellValue(intSelRow, "执行科室").ToString();
            _studyInfo.检查设备 = "";    // gridView1.GetRowCellValue(intSelRow, "检查设备").ToString();
            _studyInfo.符合情况 = "";    //gridView1.GetRowCellValue(intSelRow, "符合情况").ToString();
            //_studyInfo.报到时间 = "";//gridView1.GetRowCellValue(intSelRow, "报到时间").ToString();

            _studyInfo.登记人  = gridView1.GetRowCellValue(intSelRow, "登记人").ToString();
            _studyInfo.报到人  = "";   //gridView1.GetRowCellValue(intSelRow, "报到人").ToString();
            _studyInfo.完成人  = "";   //gridView1.GetRowCellValue(intSelRow, "完成人").ToString();
            _studyInfo.绿色通道 = "";   // gridView1.GetRowCellValue(intSelRow, "绿色通道").ToString();

            _studyInfo.项目摘要 = gridView1.GetRowCellValue(intSelRow, "项目摘要").ToString();
            _studyInfo.患者科室 = gridView1.GetRowCellValue(intSelRow, "患者科室").ToString();
            string strdt = gridView1.GetRowCellValue(intSelRow, "出生日期").ToString();

            _studyInfo.出生日期  = Convert.ToDateTime(strdt);
            _studyInfo.身份证号  = gridView1.GetRowCellValue(intSelRow, "身份证号").ToString();
            _studyInfo.联系人电话 = gridView1.GetRowCellValue(intSelRow, "联系人电话").ToString();


            System.Diagnostics.Debug.WriteLine("LoadOneData step2");
            ///////////////界面控件信息填充


            txtName.Text        = _studyInfo.姓名;
            txtAge.Text         = _studyInfo.年龄;
            dtp.Text            = _studyInfo.出生日期.ToString();
            cboSex.SelectedItem = _studyInfo.性别;

            txtPhoneNo.Text = _studyInfo.联系人电话;

            string strCheckID = _dbHelper.ExecuteSQLOneOutput("select max(检查号) from 影像检查信息").ToString();

            long lngNextID;

            if (strCheckID == "")
            {
                lngNextID = 1;
            }
            else
            {
                lngNextID  = Convert.ToInt64(strCheckID);
                lngNextID += 1;
            }
            txtCheckNo.Text = lngNextID.ToString();



            txtID.Text            = _studyInfo.身份证号;
            txtAdvice.Text        = _studyInfo.项目摘要;
            cboRoom.SelectedIndex = -1;
            DateTime dt = System.DateTime.Now;

            dt.ToString("yyyy-MM-dd HH24:MI:ss");
            txtRequestTime.Text = dt.ToString();

            txtOther.Text = "";
            txtH.Text     = "";
            txtW.Text     = "";

            dtp.Visible            = true;
            txtRequestTime.Visible = true;
            System.Diagnostics.Debug.WriteLine("LoadOneData ok");
        }