コード例 #1
0
ファイル: ActionSoftWare.cs プロジェクト: windygu/.net-wms
        private void WriteSoftwareInfo(SoftwareActionEventArgs actionEventArgs, DataCollectFacade facade, ActionCheckStatus actionCheckStatus)
        {
            SimulationReport report = actionEventArgs.ProductInfo.NowSimulationReport;

            OnWIPSoftVersion onWIPSoftVersion = facade.CreateNewOnWIPSoftVersion();

            onWIPSoftVersion.SoftwareVersion     = actionEventArgs.SoftwareVersion;
            onWIPSoftVersion.SoftwareName        = actionEventArgs.SoftwareName;
            onWIPSoftVersion.RunningCard         = report.RunningCard;
            onWIPSoftVersion.RunningCardSequence = report.RunningCardSequence;
            onWIPSoftVersion.MOCode           = report.MOCode;
            onWIPSoftVersion.ItemCode         = report.ItemCode;
            onWIPSoftVersion.ResourceCode     = report.ResourceCode;
            onWIPSoftVersion.OPCode           = report.OPCode;
            onWIPSoftVersion.RouteCode        = report.RouteCode;
            onWIPSoftVersion.ModelCode        = report.ModelCode;
            onWIPSoftVersion.MaintainDate     = report.MaintainDate;
            onWIPSoftVersion.MaintainTime     = report.MaintainTime;
            onWIPSoftVersion.MaintainUser     = report.MaintainUser;
            onWIPSoftVersion.ShiftTypeCode    = report.ShiftTypeCode;
            onWIPSoftVersion.StepSequenceCode = report.StepSequenceCode;
            onWIPSoftVersion.SegmnetCode      = report.SegmentCode;
            onWIPSoftVersion.ShiftCode        = report.ShiftCode;
            onWIPSoftVersion.TimePeriodCode   = report.TimePeriodCode;
            onWIPSoftVersion.MOSeq            = report.MOSeq; // Added by Icyer 2007/07/02

            if (actionCheckStatus == null || actionCheckStatus.NeedUpdateSimulation == true)
            {
                facade.AddOnWIPSoftVersion(onWIPSoftVersion);
            }
            else
            {
                actionEventArgs.OnWIP.Add(onWIPSoftVersion);
            }
        }
コード例 #2
0
 private void _helper_DomainObjectToExportRow(object sender, EventArgs e)
 {
     if (this.SoftCompareResult == SoftCompareStatus.Success)
     {
         if ((e as DomainObjectToExportRowEventArgs).DomainObject != null)
         {
             OnWIPSoftVersion obj = (e as DomainObjectToExportRowEventArgs).DomainObject as OnWIPSoftVersion;
             (e as DomainObjectToExportRowEventArgs).ExportRow =
                 new string[] {
                 obj.RunningCard,
                 obj.SoftwareName,
                 obj.SoftwareVersion,
                 obj.MOCode,
                 obj.ItemCode,
                 obj.OPCode,
                 obj.StepSequenceCode,
                 obj.ResourceCode,
                 obj.MaintainUser,
                 FormatHelper.ToDateString(obj.MaintainDate),
                 FormatHelper.ToTimeString(obj.MaintainTime)
             };
         }
     }
     else
     {
         if ((e as DomainObjectToExportRowEventArgs).DomainObject != null)
         {
             OnWIPSoftVersionError obj = (e as DomainObjectToExportRowEventArgs).DomainObject as OnWIPSoftVersionError;
             (e as DomainObjectToExportRowEventArgs).ExportRow =
                 new string[] {
                 obj.Rcard,
                 obj.SoftwareName,
                 obj.MoVersionInfo,
                 obj.VersionInfo,
                 obj.Mocode,
                 obj.ItemCode,
                 obj.OPCode,
                 obj.StepSequenceCode,
                 obj.ResourceCode,
                 obj.MUser,
                 FormatHelper.ToDateString(obj.MDate),
                 FormatHelper.ToTimeString(obj.MTime)
             };
         }
     }
 }