internal ExProcessStep(DataModels.PExprocessstep data) : this() { this.Id = data.Id; this.StepId = data.StepId; this.StepTitle = data.StepTitle; this.ExProcessId = data.ExProcessId; this.OrderIndex = data.OrderIndex; this.ProcessDeviceId = data.ProcessDeviceId; this.ActionType = SysHelper.Enums.EnumHelper.Parse <SysHelper.Enums.DeviceActionType>(data.ActionType); this.IsSync = Convert.ToBoolean(data.IsSync); this.SyncStepInterval = data.SyncStepInterval; this.FinishParType = SysHelper.Enums.EnumHelper.Parse <SysHelper.Enums.DeviceParameterType>(data.FinishParType); this.FinishParUnit = data.FinishParUnit; this.FinishParValue = data.FinishParValue; this.BeforeStepId = data.BeforeStepId; this.ResultsId = data.ResultsId; this.Delayed = data.Delayed; }
internal DataModels.PExprocessstep ToData() { DataModels.PExprocessstep data = new DataModels.PExprocessstep(); data.Id = this.Id; data.StepId = this.StepId; data.StepTitle = this.StepTitle; data.ExProcessId = this.ExProcessId; data.OrderIndex = this.OrderIndex; data.ProcessDeviceId = this.ProcessDeviceId; data.ActionType = Enum.GetName(this.ActionType.GetType(), this.ActionType); data.IsSync = Convert.ToSByte(this.IsSync); data.SyncStepInterval = this.SyncStepInterval; data.FinishParType = Enum.GetName(this.FinishParType.GetType(), this.FinishParType); data.FinishParUnit = this.FinishParUnit; data.FinishParValue = this.FinishParValue; data.BeforeStepId = this.BeforeStepId; data.ResultsId = this.ResultsId; data.Delayed = this.Delayed; return(data); }