/// <summary> /// 获得实体 /// </summary> /// <returns></returns> private ReportFile EntityGet() { ReportFile entity = new ReportFile(); entity.ID = HTDataID; entity.SelectByID(); if (HTFormStatus == FormStatus.新增) { entity.Context = HttSoft.WinUIBase.FastReport.ConvertToBinaryByPath(txtFilePath.Text.Trim()); } if (HTFormStatus == FormStatus.修改) { if (txtFilePath.Text.Trim() != "") { entity.Context = HttSoft.WinUIBase.FastReport.ConvertToBinaryByPath(txtFilePath.Text.Trim()); } } entity.FileID = SysConvert.ToInt32(txtFileID.Text.Trim()); entity.FileType = SysConvert.ToInt32(txtFileType.Text.Trim()); entity.FileName = txtFileName.Text.Trim(); entity.FileExec = txtFileExec.Text.Trim(); entity.Remark = txtRemark.Text.Trim(); entity.Seq = SysConvert.ToInt32(txtSeq.Text.Trim()); //entity.MFlag = SysConvert.ToInt32(txtMFlag.Text.Trim()); if (txtUploadTime.DateTime != SystemConfiguration.DateTimeDefaultValue && txtUploadTime.Text != "") { entity.UploadTime = txtUploadTime.DateTime.Date; } return(entity); }
/// <summary> /// 设置 /// </summary> public override void EntitySet() { ReportFile entity = new ReportFile(); entity.ID = HTDataID; bool findFlag = entity.SelectByID(); txtFileID.Text = entity.FileID.ToString(); txtFileType.Text = entity.FileType.ToString(); txtFileName.Text = entity.FileName.ToString(); txtFileExec.Text = entity.FileExec.ToString(); txtRemark.Text = entity.Remark.ToString(); txtUploadTime.DateTime = entity.UploadTime; txtSeq.Text = entity.Seq.ToString(); //txtMFlag.Text = entity.MFlag.ToString(); if (txtUploadTime.DateTime == SystemConfiguration.DateTimeDefaultValue) { txtUploadTime.Text = ""; } if (!findFlag) { } }