コード例 #1
0
        /// <summary>
        /// 获得实体
        /// </summary>
        /// <returns></returns>
        private SOContext EntityGet()
        {
            SOContext entity = new SOContext();

            entity.ID = HTDataID;
            entity.SelectByID();
            entity.Code    = txtCode.Text.Trim();
            entity.Name    = txtName.Text.Trim();
            entity.Context = txtContext.Text.Trim();
            entity.Remark  = txtRemark.Text.Trim();
            entity.Type    = cmbTextType.Text.ToString();
            entity.DelFlag = SysConvert.ToInt32(drpUseableFlag.EditValue);
            return(entity);
        }
コード例 #2
0
        /// <summary>
        /// 设置
        /// </summary>
        public override void EntitySet()
        {
            SOContext entity = new SOContext();

            entity.ID = HTDataID;
            bool findFlag = entity.SelectByID();

            txtCode.Text             = entity.Code.ToString();
            txtName.Text             = entity.Name.ToString();
            txtContext.Text          = entity.Context.ToString();
            txtRemark.Text           = entity.Remark.ToString();
            cmbTextType.Text         = entity.Type.ToString();
            drpUseableFlag.EditValue = entity.DelFlag;

            if (!findFlag)
            {
            }
        }