///<summary>
 ///删除病区
 ///</summary>
 public void m_mthRemoveArea()
 {
     if (this.m_objViewer.m_lsvCurrentArea.SelectedItems.Count > 0)
     {
         clsMedStoreVsArea m_objVO = new clsMedStoreVsArea();
         m_objVO.m_strMEDSTOREID_CHR = this.m_objViewer.cboMedStoreType.SelectItemValue;
         m_objVO.m_strAREAID_CHR     = this.m_objViewer.m_lsvCurrentArea.SelectedItems[0].Text.Trim();
         m_objVO.m_strCANCELERID_CHR = this.m_objViewer.LoginInfo.m_strEmpID;
         m_objVO.m_datCANCEL_DAT     = DateTime.Now;
         m_objVO.m_intStatusINT      = 0;
         long lngRes = -1;
         lngRes = m_objDomain.m_lngUpdateMedStoreVsAreaInfo(m_objVO);
         if (lngRes > 0)
         {
             this.m_objViewer.m_lsvCurrentArea.SelectedItems[0].Remove();
             if (this.m_objViewer.m_lsvCurrentArea.Items.Count > 0)
             {
                 this.m_objViewer.m_lsvCurrentArea.Items[0].Selected = true;
             }
         }
     }
     else
     {
         MessageBox.Show("请先选择病区!", "iCare系统温馨提示:", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);
         if (this.m_objViewer.m_lsvCurrentArea.Items.Count > 0)
         {
             this.m_objViewer.m_lsvCurrentArea.Items[0].Selected = true;
         }
         return;
     }
 }
Ejemplo n.º 2
0
        //#region 根据药房id和病区id删除中心药房对应病区的纪录
        // /// <summary>
        ///// 根据药房id和病区id删除中心药房对应病区的纪录
        // /// </summary>
        // /// <param name="m_strMedStoreId"></param>
        // /// <param name="m_strAreaId"></param>
        // /// <returns></returns>
        //public long m_lngDelMedStoreVsAreaInfoByID(string m_strMedStoreId, string m_strAreaId)
        //{
        //    long lngRes = 0;
        //    clsMedStoreBseInfoSvc objSvc =
        //       (clsMedStoreBseInfoSvc)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsMedStoreBseInfoSvc));
        //    lngRes = objSvc.m_lngDelMedStoreVsAreaInfoByID(objPrincipal, m_strMedStoreId, m_strAreaId);
        //    objSvc.Dispose();
        //    return lngRes;

        //}
        //#endregion
        #region 根据药房id和病区id更新中心药房对应病区的纪录
        /// <summary>
        /// 根据药房id和病区id更新中心药房对应病区的纪录
        /// </summary>
        /// <param name="m_objVO"></param>
        /// <returns></returns>
        public long m_lngUpdateMedStoreVsAreaInfo(clsMedStoreVsArea m_objVO)
        {
            long lngRes = 0;
            clsMedStoreBseInfoSvc objSvc =
                (clsMedStoreBseInfoSvc)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsMedStoreBseInfoSvc));

            lngRes = objSvc.m_lngUpdateMedStoreVsAreaInfo(objPrincipal, m_objVO);
            objSvc.Dispose();
            return(lngRes);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 根据中心药房id插入相应管理病区的信息
        /// </summary>
        /// <param name="m_objData"></param>
        /// <returns></returns>
        public long m_lngInsertMedStoreAreaRelation(clsMedStoreVsArea m_objData)
        {
            long lngRes = 0;

            clsMedStoreBseInfoSvc objSvc =
                (clsMedStoreBseInfoSvc)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsMedStoreBseInfoSvc));

            lngRes = objSvc.m_lngInsertMedStoreAreaRelation(objPrincipal, m_objData);
            objSvc.Dispose();
            return(lngRes);
        }
      /// <summary>
      /// 保存病区顺序号
      /// </summary>
      /// <returns></returns>
      public long m_mthSaveOrderOfTable()
      {
          long lngRes = -1;

          clsMedStoreVsArea[] m_objVOArr;
          m_objVOArr = new clsMedStoreVsArea[this.m_objViewer.m_lsvCurrentArea.Items.Count];
          for (int i = 0; i < this.m_objViewer.m_lsvCurrentArea.Items.Count; i++)
          {
              m_objVOArr[i] = new clsMedStoreVsArea();
              m_objVOArr[i].m_strMEDSTOREID_CHR = this.m_objViewer.cboMedStoreType.SelectItemValue;
              m_objVOArr[i].m_strAREAID_CHR     = this.m_objViewer.m_lsvCurrentArea.Items[i].Text;
              m_objVOArr[i].m_intORDER_INT      = int.Parse(this.m_objViewer.m_lsvCurrentArea.Items[i].SubItems[2].Text);
          }
          lngRes = m_objDomain.m_lngUpdateOrderOfTable(m_objVOArr);
          return(lngRes);
      }
 ///<summary>
 ///添加病区
 ///</summary>
 public void m_mthAddArea()
 {
     if (this.m_objViewer.m_lsvAllAreas.SelectedItems.Count > 0)
     {
         for (int i = 0; i < this.m_objViewer.m_lsvCurrentArea.Items.Count; i++)
         {
             if (this.m_objViewer.m_lsvAllAreas.SelectedItems[0].Text.Trim() == this.m_objViewer.m_lsvCurrentArea.Items[i].Text.Trim())
             {
                 MessageBox.Show("该中心药方已经存在着这个病区!", "iCare系统温馨提示:", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);
                 return;
             }
         }
         clsMedStoreVsArea m_objVo = new clsMedStoreVsArea();
         m_objVo.m_datCreateTime = DateTime.Now;
         int m_intCount = this.m_objViewer.m_lsvCurrentArea.Items.Count;
         if (m_intCount > 0)
         {
             m_objVo.m_intORDER_INT = int.Parse(this.m_objViewer.m_lsvCurrentArea.Items[m_intCount - 1].SubItems[2].Text.ToString()) + 1;
         }
         else
         {
             m_objVo.m_intORDER_INT = 1;
         }
         m_objVo.m_intStatusINT      = 1;
         m_objVo.m_strAREAID_CHR     = this.m_objViewer.m_lsvAllAreas.SelectedItems[0].Text.Trim();
         m_objVo.m_strMEDSTOREID_CHR = this.m_objViewer.cboMedStoreType.SelectItemValue;
         m_objVo.m_strCreateID       = this.m_objViewer.LoginInfo.m_strEmpID;
         long lngRes = -1;
         lngRes = m_objDomain.m_lngInsertMedStoreAreaRelation(m_objVo);
         if (lngRes > 0)
         {
             ListViewItem m_objItem = (ListViewItem)this.m_objViewer.m_lsvAllAreas.SelectedItems[0].Clone();
             m_objItem.Text             = this.m_objViewer.m_lsvAllAreas.SelectedItems[0].Text;
             m_objItem.SubItems[1].Text = this.m_objViewer.m_lsvAllAreas.SelectedItems[0].SubItems[1].Text;
             m_objItem.SubItems[2].Text = m_objVo.m_intORDER_INT.ToString();
             this.m_objViewer.m_lsvCurrentArea.Items.Add(m_objItem);
             this.m_objViewer.m_lsvCurrentArea.Items[m_intCount].Selected = true;
         }
     }
     else
     {
         MessageBox.Show("请先选择病区!", "iCare系统温馨提示:", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);
         this.m_objViewer.m_lsvAllAreas.Items[0].Selected = true;
         return;
     }
 }