/// <summary> /// 填充实体信息 /// </summary> protected override void FillModelInfo() { XVStandardInfo info = this.m_CurrentModel as XVStandardInfo; if (this.m_EditStatus == XEditStatus.AddNew) { info.RID = this.m_PrimaryKeyId; } info.StandNo = this.txtStandNo.Text; info.StandName = this.txtStandName.Text; info.CreateTime = XHelper.GetFormatedDate(this.dtCreateTime.Value); info.NextCheckTime = XHelper.GetFormatedDate(this.dtNextCheckTime.Value); info.CheckTimes = XHelper.GetInt(this.nebCheckTimes.Value); info.ChargeUserId = this.txtChargeUserId.Text; info.Remark = this.txtRemark.Text; info.StandDesc = this.txtStandDesc.Text.Trim(); //info.StandStatus = this.txtStatus111.ValueMember; //info.StandStatusName = this.txtStatus111.DisplayMember; info.StandStatus = this.cboStatus.Text.Trim(); base.FillModelInfo(); }
/// <summary> /// 设置修改时的默认值 /// </summary> protected override void SetDefaultValue() { XVStandardInfo info = this.m_CurrentModel as XVStandardInfo; this.txtStandNo.Text = info.StandNo; this.txtStandName.Text = info.StandName; this.dtCreateTime.Value = XHelper.GetDateTime(info.CreateTime); this.dtNextCheckTime.Value = XHelper.GetDateTime(info.NextCheckTime); this.nebCheckTimes.Value = info.CheckTimes; this.txtChargeUserId.Text = info.ChargeUserId; this.txtRemark.Text = info.Remark; //if (info.StandStatus != string.Empty) //{ // this.txtStatus111.Text = info.StandStatusName; // this.txtStatus111.ValueMember = info.StandStatus; // this.txtStatus111.DisplayMember = info.StandStatusName; //} this.cboStatus.Text = info.StandStatus; this.txtStandDesc.Text = info.StandDesc; }
protected override void FillRowViewInfos(XModelBase model, System.Data.DataRow modelRow) { XVStandardInfo info = model as XVStandardInfo; info.StandStatusName = XHelper.GetString(modelRow["StandStatusName"]); }