Beispiel #1
0
        /// <summary>
        /// 填充实体信息
        /// </summary>
        protected override void FillModelInfo()
        {
            XVStandEquipmentCheckRecordInfo info = this.m_CurrentModel as XVStandEquipmentCheckRecordInfo;

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

            info.StandEqupimentId = this.txtStandEqupimentId.ValueMember;
            info.EquipmentName    = this.txtStandEqupimentId.DisplayMember;
            if (this.txtStandEqupimentId.SelectedModel != null)
            {
                XVStandEquipmentInfo equipmentInfo = this.txtStandEqupimentId.SelectedModel as XVStandEquipmentInfo;
                info.StandId   = equipmentInfo.MainId;
                info.StandName = equipmentInfo.StandName;
            }
            info.CheckUserName = this.txtCheckUserName.Text;
            info.CheckDesc     = this.txtCheckDesc.Text;
            info.CheckDate     = XHelper.GetFormatedDate(this.dtCheckDate.Value);
            info.NextCheckDate = XHelper.GetFormatedDate(this.dtNextCheckDate.Value);
            info.Remark        = this.txtRemark.Text;

            base.FillModelInfo();
        }
Beispiel #2
0
        protected override void FillRowViewInfos(XModelBase model, System.Data.DataRow modelRow)
        {
            XVStandEquipmentCheckRecordInfo info = model as XVStandEquipmentCheckRecordInfo;

            info.EquipmentName = XHelper.GetString(modelRow["EquipmentName"]);
            info.StandName     = XHelper.GetString(modelRow["StandName"]);
            info.StandId       = XHelper.GetString(modelRow["StandId"]);
        }
Beispiel #3
0
        /// <summary>
        /// 设置修改时的默认值
        /// </summary>
        protected override void SetDefaultValue()
        {
            XVStandEquipmentCheckRecordInfo info = this.m_CurrentModel as XVStandEquipmentCheckRecordInfo;

            if (info.StandEqupimentId != string.Empty)
            {
                this.txtStandEqupimentId.Text          = info.EquipmentName;
                this.txtStandEqupimentId.ValueMember   = info.StandEqupimentId;
                this.txtStandEqupimentId.DisplayMember = info.EquipmentName;
            }
            this.txtCheckUserName.Text = info.CheckUserName;
            this.txtCheckDesc.Text     = info.CheckDesc;
            this.dtCheckDate.Value     = XHelper.GetDateTime(info.CheckDate);
            this.dtNextCheckDate.Value = XHelper.GetDateTime(info.NextCheckDate);
            this.txtRemark.Text        = info.Remark;
        }