Ejemplo n.º 1
0
        /// <summary>
        /// 设置修改时的默认值
        /// </summary>
        protected override void SetDefaultValue()
        {
            XVMeetingProjectInfo info = this.m_CurrentModel as XVMeetingProjectInfo;

            this.txtProjectName.Text = info.ProjectName;
            this.txtProjectDesc.Text = info.ProjectDesc;
            this.dtStartTime.Value   = XHelper.GetDateTime(info.StartTime);
            this.dtEndTime.Value     = XHelper.GetDateTime(info.EndTime);
            this.txtPurveyor.Text    = info.Purveyor;
            this.txtLinkman.Text     = info.Linkman;
            this.txtTel.Text         = info.Tel;

            if (info.ProjectTypeId != string.Empty)
            {
                this.txtProjectTypeId.Text          = info.ProjectType;
                this.txtProjectTypeId.ValueMember   = info.ProjectTypeId;
                this.txtProjectTypeId.DisplayMember = info.ProjectType;
            }

            if (info.DeptId != string.Empty)
            {
                this.txtDeptId.Text          = info.DeptName;
                this.txtDeptId.ValueMember   = info.DeptId;
                this.txtDeptId.DisplayMember = info.DeptName;
            }

            this.txtRemark.Text = info.Remark;
        }
Ejemplo n.º 2
0
        protected override void FillRowViewInfos(XModelBase model, System.Data.DataRow modelRow)
        {
            XVMeetingProjectInfo info = model as XVMeetingProjectInfo;

            info.DeptName    = XHelper.GetString(modelRow["DeptName"]);
            info.ProjectType = XHelper.GetString(modelRow["ProjectType"]);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 填充实体信息
        /// </summary>
        protected override void FillModelInfo()
        {
            XVMeetingProjectInfo info = this.m_CurrentModel as XVMeetingProjectInfo;

            if (this.m_EditStatus == XEditStatus.AddNew)
            {
                info.RID = this.GetNewId();
            }

            info.ProjectName   = this.txtProjectName.Text;
            info.ProjectDesc   = this.txtProjectDesc.Text;
            info.StartTime     = XHelper.GetFormatedDate(this.dtStartTime.Value);
            info.EndTime       = XHelper.GetFormatedDate(this.dtEndTime.Value);
            info.Purveyor      = this.txtPurveyor.Text;
            info.Linkman       = this.txtLinkman.Text;
            info.Tel           = this.txtTel.Text;
            info.ProjectTypeId = this.txtProjectTypeId.ValueMember;
            info.ProjectType   = this.txtProjectTypeId.DisplayMember;
            info.DeptId        = this.txtDeptId.ValueMember;
            info.DeptName      = this.txtDeptId.DisplayMember;
            info.Remark        = this.txtRemark.Text;

            base.FillModelInfo();
        }