Пример #1
0
        /// <summary>
        /// 获得实体
        /// </summary>
        /// <returns></returns>
        private SysStudyDic EntityGet()
        {
            SysStudyDic entity = new SysStudyDic();

            entity.ID = HTDataID;
            entity.SelectByID();
            entity.Title      = txtTitle.Text.Trim();
            entity.WinListID  = HelpWinListID;
            entity.HeadTypeID = HelpHeadTypeID;
            entity.SubTypeID  = HelpSubTypeID;
            entity.Context    = txtContext.Text.Trim();
            if (HTFormStatus == FormStatus.新增)
            {
                entity.AddOPID = FParamConfig.LoginID;
                entity.AddTime = DateTime.Now;
            }
            if (chkSysFlag.Checked)
            {
                entity.SysFlag = 1;
            }
            else
            {
                entity.SysFlag = 0;
            }
            entity.UpdOPID = FParamConfig.LoginID;
            entity.UpdTime = DateTime.Now;
            return(entity);
        }
Пример #2
0
        /// <summary>
        /// 设置
        /// </summary>
        public override void EntitySet()
        {
            SysStudyDic entity = new SysStudyDic();

            entity.ID = HTDataID;
            entity.SelectByID();
            txtTitle.Text   = entity.Title;
            txtContext.Text = entity.Context;
            if (entity.SysFlag == 1)
            {
                chkSysFlag.Checked = true;
            }
            else
            {
                chkSysFlag.Checked = false;
            }
        }
Пример #3
0
        /// <summary>
        /// 设置实体
        /// </summary>
        private void SetEntity()
        {
            SysStudyDic entity = new SysStudyDic();

            entity.ID = SaveID;
            if (entity.SelectByID())
            {
                txtTitle.Text   = entity.Title;
                txtContext.Text = entity.Context;
                lblInfo.Text    = "添加:" + entity.AddOPID + "(" + entity.AddTime.ToString("yyyy-MM-dd HH:mm") + ") 最近编辑:" + entity.UpdOPID + "(" + entity.UpdTime.ToString("yyyy-MM-dd HH:mm") + ")";
            }
            else
            {
                txtTitle.Text   = "帮助内容未定义";
                txtContext.Text = "帮助内容未定义";
                lblInfo.Text    = "";
            }
        }