コード例 #1
0
ファイル: frmMiniBooldSugarChk.cs プロジェクト: ewin66/HIS
        protected override long m_lngSubDelete()
        {
            if (m_lsvResult.SelectedItems.Count <= 0)
            {
                return(0);
            }
            m_objCurValue = m_lsvResult.SelectedItems[0].Tag as clsMiniBloodSugarChkValue;
            m_objCurValue.m_strDeActivedUserID = MDIParent.strOperatorID;
            m_objCurValue.m_dtmDeActivedDate   = DateTime.Now;
            long lngRes = m_objDomain.m_lngDeleteRecoed(m_objCurValue);

            if (lngRes <= 0)
            {
                clsPublicFunction.ShowInformationMessageBox("删除失败!");
            }
            else
            {
                m_objCurValue = null;
                m_lsiCurItem  = null;
                m_lsvResult.SelectedItems[0].Remove();
                m_lsvResult.Invalidate();
                m_mthClearText();
                m_mthSetEnable(true);
                clsPublicFunction.ShowInformationMessageBox("删除成功!");
            }
            return(lngRes);
        }
コード例 #2
0
ファイル: frmMiniBooldSugarChk.cs プロジェクト: ewin66/HIS
 private void m_lsvResult_SelectedIndexChanged(object sender, System.EventArgs e)
 {
     if (m_lsvResult.SelectedItems.Count <= 0)
     {
         return;
     }
     m_objCurValue         = m_lsvResult.SelectedItems[0].Tag as clsMiniBloodSugarChkValue;
     m_lsiCurItem          = m_lsvResult.SelectedItems[0];
     m_dtpCreateDate.Value = m_objCurValue.m_dtmCreatedDate;
 }
コード例 #3
0
ファイル: frmMiniBooldSugarChk.cs プロジェクト: ewin66/HIS
        private void m_lsvResult_DoubleClick(object sender, System.EventArgs e)
        {
            if (m_lsvResult.SelectedItems.Count <= 0)
            {
                return;
            }
            m_objCurValue         = m_lsvResult.SelectedItems[0].Tag as clsMiniBloodSugarChkValue;
            m_lsiCurItem          = m_lsvResult.SelectedItems[0];
            m_dtpCreateDate.Value = m_objCurValue.m_dtmCreatedDate;

            m_txtBreakfast.Text = m_objCurValue.m_strBreakfast;
            m_txtLunch.Text     = m_objCurValue.m_strLunch;
            m_txtSupper.Text    = m_objCurValue.m_strSupper;
            m_txtPreRest.Text   = m_objCurValue.m_strPreRest;
            m_mthSetEnable(false);
        }
コード例 #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="p_objValue"></param>
        /// <returns></returns>
        public long m_lngDeleteRecoed(clsMiniBloodSugarChkValue p_objValue)
        {
            clsMiniBloodSugarChkServ m_objServ =
                (clsMiniBloodSugarChkServ)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsMiniBloodSugarChkServ));

            long lngResult = 0;

            try
            {
                lngResult = m_objServ.m_lngDeleteRecoed(p_objValue);
            }
            finally
            {
                //m_objServ.Dispose();
            }
            return(lngResult);
        }
コード例 #5
0
ファイル: frmMiniBooldSugarChk.cs プロジェクト: ewin66/HIS
        protected override long m_lngSubAddNew()
        {
            if (m_blnCheckEmpty() || m_objBaseCurrentPatient == null)
            {
                return(0);
            }
            clsMiniBloodSugarChkValue objValue = new clsMiniBloodSugarChkValue();

            objValue.m_strInPatientID   = m_objBaseCurrentPatient.m_StrInPatientID;
            objValue.m_dtmInPatientDate = m_objBaseCurrentPatient.m_DtmSelectedInDate;
            objValue.m_strCreateUserID  = MDIParent.strOperatorID;
            objValue.m_dtmCreatedDate   = m_dtpCreateDate.Value;
            objValue.m_strBreakfast     = m_txtBreakfast.Text.Trim();
            objValue.m_strLunch         = m_txtLunch.Text.Trim();
            objValue.m_strSupper        = m_txtSupper.Text.Trim();
            objValue.m_strPreRest       = m_txtPreRest.Text.Trim();
            objValue.m_dtmOpenDate      = DateTime.Now;
            long lngRes = m_objDomain.m_lngAddNewRecoed(objValue);

            if (lngRes <= 0)
            {
                clsPublicFunction.ShowInformationMessageBox("保存失败!");
            }
            else
            {
                m_objCurValue = objValue;
                ListViewItem item = new ListViewItem(new string[] { objValue.m_dtmCreatedDate.ToString(m_strDateFormat), objValue.m_strBreakfast, objValue.m_strLunch, objValue.m_strSupper, objValue.m_strPreRest });
                item.Tag = objValue;
                m_lsvResult.Items.Add(item);
                m_lsvResult.Sorting = SortOrder.Ascending;
                item.Selected       = true;
                clsPublicFunction.ShowInformationMessageBox("保存成功!");
                m_lsvResult.Invalidate();
                m_mthClearText();
                m_mthSetEnable(true);
            }
            return(lngRes);
        }