Beispiel #1
0
        public long m_lngDoUpdRegByID(clsRegType_VO p_objResultArr)
        {
            long lngRes = 0;

            com.digitalwave.iCare.middletier.HIS.clsRegTypeSvc objSvc =
                (com.digitalwave.iCare.middletier.HIS.clsRegTypeSvc)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(com.digitalwave.iCare.middletier.HIS.clsRegTypeSvc));
            lngRes = objSvc.m_lngDoUpdRegTypeByID(objPrincipal, p_objResultArr);
            objSvc.Dispose();
            return(lngRes);
        }
Beispiel #2
0
        public long m_lngAddRegType(clsRegType_VO p_objResult, out string strID)
        {
            long lngRes = 0;

            com.digitalwave.iCare.middletier.HIS.clsRegTypeSvc objSvc =
                (com.digitalwave.iCare.middletier.HIS.clsRegTypeSvc)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(com.digitalwave.iCare.middletier.HIS.clsRegTypeSvc));
            lngRes = objSvc.m_lngDoAddNewRegType(objPrincipal, p_objResult, out strID);
            objSvc.Dispose();
            return(lngRes);
        }
Beispiel #3
0
        public long m_lngFindRegTypeList(System.Security.Principal.IPrincipal p_objPrincipal, out clsRegType_VO[] p_objResultArr)
        {
            p_objResultArr = new clsRegType_VO[0];
            long lngRes = 0;
            clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService();

            lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.LIS.clsLisDeviceSvc", "m_lngFindRegTypeList");
            if (lngRes < 0)
            {
                return(-1);
            }
            string strSQL = @"SELECT * FROM T_BSE_REGISTERTYPE order by REGISTERTYPEID_CHR";

            try
            {
                DataTable dtbResult = new DataTable();
                com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();
                lngRes = objHRPSvc.lngGetDataTableWithoutParameters(strSQL, ref dtbResult);
                objHRPSvc.Dispose();
                if (lngRes > 0 && dtbResult.Rows.Count > 0)
                {
                    p_objResultArr = new clsRegType_VO[dtbResult.Rows.Count];
                    for (int i1 = 0; i1 < p_objResultArr.Length; i1++)
                    {
                        p_objResultArr[i1] = new clsRegType_VO();
                        p_objResultArr[i1].m_strRegTypeID   = dtbResult.Rows[i1]["REGISTERTYPEID_CHR"].ToString().Trim();
                        p_objResultArr[i1].m_strRegTypeName = dtbResult.Rows[i1]["REGISTERTYPENAME_VCHR"].ToString().Trim();
                        p_objResultArr[i1].m_strRegTypeMemo = dtbResult.Rows[i1]["MEMO_VCHR"].ToString().Trim();
                        p_objResultArr[i1].m_strRegTypeNo   = dtbResult.Rows[i1]["REGISTERTYPENO_VCHR"].ToString().Trim();
                        p_objResultArr[i1].m_strIsUsing     = dtbResult.Rows[i1]["ISUSING_NUM"].ToString().Trim();
                        p_objResultArr[i1].m_strIsDoctor    = dtbResult.Rows[i1]["ISDOCTOR_NUM"].ToString().Trim();
                        p_objResultArr[i1].m_strIsUrgency   = dtbResult.Rows[i1]["URGENCY_INT"].ToString().Trim();                      //xigui.peng 添加
                    }
                }
            }
            catch (Exception objEx)
            {
                string strTmp = objEx.Message;
                com.digitalwave.Utility.clsLogText objLogger = new clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
Beispiel #4
0
        public long m_lngDoAddNewRegType(System.Security.Principal.IPrincipal p_objPrincipal, clsRegType_VO objResult, out string p_strID)
        {
            long lngRes = 0;

            p_strID = "";
            //权限类
            clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService();

            //检查是否有使用些函数的权限
            lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.HIS.clsRegTypeSvc", "m_lngDoAddNewRegType");
            if (lngRes < 0)            //没有使用的权限
            {
                return(-1);
            }
            com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();
            //返回一最大的计划号
            lngRes = objHRPSvc.lngGenerateID(4, "REGISTERTYPEID_CHR", "T_BSE_REGISTERTYPE", out p_strID);
            if (lngRes < 0)
            {
                return(-1);
            }
//			string strSQL = "INSERT INTO T_BSE_REGISTERTYPE (REGISTERTYPEID_CHR, REGISTERTYPENAME_VCHR, MEMO_VCHR ,REGISTERTYPENO_VCHR,ISDOCTOR_NUM) VALUES " +
//				" ('" + p_strID + "' , '" + objResult.m_strRegTypeName + "', '" + objResult.m_strRegTypeMemo + "', '" + objResult.m_strRegTypeNo+ "', '" + objResult.m_strIsDoctor + "')";
            //xigui.peng 修改
            string strSQL = "INSERT INTO T_BSE_REGISTERTYPE (REGISTERTYPEID_CHR, REGISTERTYPENAME_VCHR, MEMO_VCHR ,REGISTERTYPENO_VCHR,ISDOCTOR_NUM,URGENCY_INT) VALUES " +
                            " ('" + p_strID + "' , '" + objResult.m_strRegTypeName + "', '" + objResult.m_strRegTypeMemo + "', '" + objResult.m_strRegTypeNo + "', '" + objResult.m_strIsDoctor + "','" + objResult.m_strIsUrgency + "')";

            try
            {
                lngRes = objHRPSvc.DoExcute(strSQL);
                objHRPSvc.Dispose();
            }
            catch (Exception objEx)
            {
                com.digitalwave.Utility.clsLogText objLogger = new clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
Beispiel #5
0
        public long m_lngDoUpdRegTypeByID(System.Security.Principal.IPrincipal p_objPrincipal, clsRegType_VO objResult)
        {
            long lngRes = 0;
            //权限类
            clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService();

            //检查是否有使用些函数的权限
            lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.HIS.clsRegTypeSvc", "m_lngDoUpdRegTypeByID");
            if (lngRes < 0)             //没有使用的权限
            {
                return(-1);
            }
            string strSQL = "UPDATE T_BSE_REGISTERTYPE SET  " +
                            "REGISTERTYPENAME_VCHR = '" + objResult.m_strRegTypeName + "', " +
                            "MEMO_VCHR = '" + objResult.m_strRegTypeMemo + "', " +
                            "REGISTERTYPENO_VCHR = '" + objResult.m_strRegTypeNo + "', " +
                            "ISDOCTOR_NUM = '" + objResult.m_strIsDoctor + "' ," +
                            "URGENCY_INT = '" + objResult.m_strIsUrgency + "' " +               //xigui.peng 添加
                            "WHERE REGISTERTYPEID_CHR = '" + objResult.m_strRegTypeID + "' ";

            try
            {
                com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();
                lngRes = objHRPSvc.DoExcute(strSQL);
                objHRPSvc.Dispose();
            }
            catch (Exception objEx)
            {
                com.digitalwave.Utility.clsLogText objLogger = new clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
Beispiel #6
0
        public void m_lngSave()
        {
            if (m_objViewer.m_txtName.Text.Trim() == "")
            {
                m_ephHandler.m_mthAddControl(m_objViewer.m_txtName);
                m_ephHandler.m_mthShowControlsErrorProvider();
                m_ephHandler.m_mthClearControl();
                m_objViewer.m_txtName.Focus();
                return;
            }

            if (m_objViewer.m_txtREGISTERTYPENO_VCHR.Text.Trim() == "")
            {
                m_ephHandler.m_mthAddControl(m_objViewer.m_txtREGISTERTYPENO_VCHR);
                m_ephHandler.m_mthShowControlsErrorProvider();
                m_ephHandler.m_mthClearControl();
                m_objViewer.m_txtREGISTERTYPENO_VCHR.Focus();
                return;
            }
            long          lngRes    = 0;
            string        strID     = "";
            clsRegType_VO objResult = new clsRegType_VO();

            objResult.m_strRegTypeName = m_objViewer.m_txtName.Text;
            objResult.m_strRegTypeMemo = m_objViewer.m_txtMemo.Text;
            objResult.m_strRegTypeNo   = m_objViewer.m_txtREGISTERTYPENO_VCHR.Text.Trim();
            objResult.m_strIsDoctor    = this.GetFlag();
            objResult.m_strIsUrgency   = this.GetFlag1();
            if (m_objViewer.m_txtName.Tag == null)          //新增
            {
                for (int i = 0; i < m_objViewer.m_lvw.Items.Count; i++)
                {
                    if (m_objViewer.m_lvw.Items[i].SubItems[2].Text.Trim() == m_objViewer.m_txtName.Text.Trim())
                    {
                        MessageBox.Show("该挂号种类已存在!", "提示");
                        m_ephHandler.m_mthAddControl(m_objViewer.m_txtName);
                        m_ephHandler.m_mthShowControlsErrorProvider();
                        m_ephHandler.m_mthClearControl();
                        m_objViewer.m_txtName.Focus();
                        m_objViewer.m_txtName.SelectAll();

                        return;
                    }
                }

                lngRes = clsDomain.m_lngAddRegType(objResult, out strID);
                int index = m_objViewer.m_lvw.Items.Count;
                if (lngRes > 0)
                {
                    ListViewItem lvw = new ListViewItem();
                    lvw.SubItems.Add(strID);
                    lvw.SubItems.Add(objResult.m_strRegTypeName);
                    lvw.SubItems.Add(objResult.m_strRegTypeMemo);
                    lvw.SubItems.Add(objResult.m_strRegTypeNo);
                    lvw.SubItems.Add("1");
                    lvw.SubItems.Add(objResult.m_strIsDoctor);
                    if (objResult.m_strIsUrgency == "1")
                    {
                        lvw.SubItems.Add("是");                             //xigui.peng添加
                    }
                    else
                    {
                        lvw.SubItems.Add("否");
                    }
                    // lvw.SubItems.Add(objResult.m_strIsUrgency);//xigui.peng添加

                    lvw.Tag = objResult.m_strRegTypeID;
                    m_objViewer.m_lvw.Items.Add(lvw);

                    m_objViewer.m_lvw.Items[index].Selected = true;
                }
                else
                {
                    MessageBox.Show("保存失败!", "提示");
                }
            }
            else
            {
                if (m_objViewer.m_lvw.SelectedItems.Count <= 0)
                {
                    return;
                }

                for (int i = 0; i < m_objViewer.m_lvw.Items.Count; i++)
                {
                    if (i == m_objViewer.m_lvw.SelectedItems[0].Index)
                    {
                        continue;
                    }
                    if (m_objViewer.m_lvw.Items[i].SubItems[2].Text.Trim() == m_objViewer.m_txtName.Text.Trim())
                    {
                        MessageBox.Show("该挂号种类已存在!", "提示");
                        m_ephHandler.m_mthAddControl(m_objViewer.m_txtName);
                        m_ephHandler.m_mthShowControlsErrorProvider();
                        m_ephHandler.m_mthClearControl();

                        m_objViewer.m_txtName.Focus();
                        m_objViewer.m_txtName.SelectAll();

                        return;
                    }
                }

                objResult.m_strRegTypeID = m_objViewer.m_txtName.Tag.ToString();
                lngRes = clsDomain.m_lngDoUpdRegByID(objResult);

                if (lngRes > 0)
                {
                    MessageBox.Show("修改成功!", "提示");

                    m_objViewer.m_lvw.SelectedItems[0].SubItems[2].Text = objResult.m_strRegTypeName;
                    m_objViewer.m_lvw.SelectedItems[0].SubItems[3].Text = objResult.m_strRegTypeMemo;
                    m_objViewer.m_lvw.SelectedItems[0].SubItems[4].Text = objResult.m_strRegTypeNo;
                    m_objViewer.m_lvw.SelectedItems[0].SubItems[6].Text = objResult.m_strIsDoctor;

                    // m_objViewer.m_lvw.SelectedItems[0].SubItems[7].Text = objResult.m_strIsUrgency;//xigui.peng 添加
                    if (objResult.m_strIsUrgency == "1")
                    {
                        m_objViewer.m_lvw.SelectedItems[0].SubItems[7].Text = "是";                        //xigui.peng 添加
                    }
                    else
                    {
                        m_objViewer.m_lvw.SelectedItems[0].SubItems[7].Text = "否";                        //xigui.peng 添加
                    }
                }
                else
                {
                    MessageBox.Show("修改失败!", "提示");
                }
            }

            m_objViewer.m_txtName.Text = "";
            m_objViewer.m_txtMemo.Text = "";
            m_objViewer.m_txtREGISTERTYPENO_VCHR.Text = "";
            m_objViewer.m_txtName.Tag = null;
            m_objViewer.ra1.Checked   = true;
            //m_objViewer.m_chkEmergency.Checked = false;//xigui.peng 添加

            m_objViewer.m_txtName.Focus();
        }