protected void InitFields(DataRow rowInfo) { this.Id = TengDa._Convert.StrToInt(rowInfo["Id"].ToString(), -1); this.getPutType = (GetPutType)Enum.Parse(typeof(GetPutType), rowInfo["GetPutType"].ToString()); this.clampStatus = (ClampStatus)Enum.Parse(typeof(ClampStatus), rowInfo["ClampStatus"].ToString()); this.clampOri = (ClampOri)Enum.Parse(typeof(ClampOri), rowInfo["ClampOri"].ToString()); this.clampId = TengDa._Convert.StrToInt(rowInfo["ClampId"].ToString(), -1); this.getPutTime = DateTime.Parse(rowInfo["GetPutTime"].ToString()); this.priority = TengDa._Convert.StrToInt(rowInfo["Priority"].ToString(), 1); this.name = rowInfo["Name"].ToString(); this.company = rowInfo["Company"].ToString(); this.model = rowInfo["Model"].ToString(); this.number = rowInfo["Number"].ToString(); this.location = rowInfo["Location"].ToString(); this.isEnable = Convert.ToBoolean(rowInfo["IsEnable"]); this.rgvValue = rowInfo["RgvValue"].ToString(); this.rgvGetFeederValue = rowInfo["RgvGetFeederValue"].ToString(); this.rgvPutFeederValue = rowInfo["RgvPutFeederValue"].ToString(); this.floorStatus = (FloorStatus)Enum.Parse(typeof(FloorStatus), rowInfo["FloorStatus"].ToString()); this.sampleStatus = (SampleStatus)Enum.Parse(typeof(SampleStatus), rowInfo["SampleStatus"].ToString()); this.PreFloorStatus = this.floorStatus; this.fromStationId = TengDa._Convert.StrToInt(rowInfo["FromStationId"].ToString(), -1); //for (int i = 0; i < Option.TemperaturePointCount + 1; i++) //{ // this.sampledDatas[i] = new List<float>(); //} }
protected void InitFields(DataRow rowInfo) { this.Id = TengDa._Convert.StrToInt(rowInfo["Id"].ToString(), -1); this.taskId = TengDa._Convert.StrToInt(rowInfo["TaskId"].ToString(), -1); this.fromStationId = TengDa._Convert.StrToInt(rowInfo["FromStationId"].ToString(), -1); this.toStationId = TengDa._Convert.StrToInt(rowInfo["ToStationId"].ToString(), -1); this.preCycleOrder = TengDa._Convert.StrToInt(rowInfo["PreCycleOrder"].ToString(), 1); this.status = (TaskStatus)Enum.Parse(typeof(TaskStatus), rowInfo["Status"].ToString()); this.fromClampStatus = (ClampStatus)Enum.Parse(typeof(ClampStatus), rowInfo["FromClampStatus"].ToString()); this.startTime = DateTime.Parse(rowInfo["StartTime"].ToString()); }
protected void InitFields(DataRow rowInfo) { this.Id = TengDa._Convert.StrToInt(rowInfo["Id"].ToString(), -1); this.name = rowInfo["Name"].ToString(); this.plcId = TengDa._Convert.StrToInt(rowInfo["PlcId"].ToString(), -1); this.company = rowInfo["Company"].ToString(); this.model = rowInfo["Model"].ToString(); this.number = rowInfo["Number"].ToString(); this.location = rowInfo["Location"].ToString(); this.isEnable = Convert.ToBoolean(rowInfo["IsEnable"]); this.clampId = TengDa._Convert.StrToInt(rowInfo["ClampId"].ToString(), -1); this.coordinateValue = TengDa._Convert.StrToInt(rowInfo["CoordinateValue"].ToString(), 1); this.clampStatus = (ClampStatus)Enum.Parse(typeof(ClampStatus), rowInfo["ClampStatus"].ToString()); }
protected void InitFields(DataRow rowInfo) { this.Id = TengDa._Convert.StrToInt(rowInfo["Id"].ToString(), -1); this.clampOri = (ClampOri)Enum.Parse(typeof(ClampOri), rowInfo["ClampOri"].ToString()); this.fromType = (GetPutType)Enum.Parse(typeof(GetPutType), rowInfo["FromType"].ToString()); this.fromClampStatus = (ClampStatus)Enum.Parse(typeof(ClampStatus), rowInfo["FromClampStatus"].ToString()); this.toType = (GetPutType)Enum.Parse(typeof(GetPutType), rowInfo["ToType"].ToString()); this.toClampStatus = (ClampStatus)Enum.Parse(typeof(ClampStatus), rowInfo["ToClampStatus"].ToString()); this.sampleStatus = (SampleStatus)Enum.Parse(typeof(SampleStatus), rowInfo["SampleStatus"].ToString()); this.priority = TengDa._Convert.StrToInt(rowInfo["Priority"].ToString(), 1); this.cycleOrder = TengDa._Convert.StrToInt(rowInfo["CycleOrder"].ToString(), 1); this.description = rowInfo["Description"].ToString(); this.isEnable = Convert.ToBoolean(rowInfo["IsEnable"]); }
public static T ClampR <T>(T value, T min, T max, ref ClampStatus clampStat) where T : System.IComparable <T> { var result = value; clampStat = ClampStatus.None; if (value.CompareTo(max) > 0) { result = max; clampStat = ClampStatus.Max; } if (value.CompareTo(min) < 0) { result = min; clampStat = ClampStatus.Min; } return(result); }
protected void InitFields(DataRow rowInfo) { this.Id = TengDa._Convert.StrToInt(rowInfo["Id"].ToString(), -1); this.getPutType = (GetPutType)Enum.Parse(typeof(GetPutType), rowInfo["GetPutType"].ToString()); this.clampStatus = (ClampStatus)Enum.Parse(typeof(ClampStatus), rowInfo["ClampStatus"].ToString()); this.clampOri = (ClampOri)Enum.Parse(typeof(ClampOri), rowInfo["ClampOri"].ToString()); this.clampId = TengDa._Convert.StrToInt(rowInfo["ClampId"].ToString(), -1); this.getPutTime = DateTime.Parse(rowInfo["GetPutTime"].ToString()); this.priority = TengDa._Convert.StrToInt(rowInfo["Priority"].ToString(), 1); this.name = rowInfo["Name"].ToString(); this.company = rowInfo["Company"].ToString(); this.model = rowInfo["Model"].ToString(); this.number = rowInfo["Number"].ToString(); this.location = rowInfo["Location"].ToString(); this.isEnable = Convert.ToBoolean(rowInfo["IsEnable"]); this.robotValues = rowInfo["RobotValues"].ToString(); this.floorStatus = (FloorStatus)Enum.Parse(typeof(FloorStatus), rowInfo["FloorStatus"].ToString()); this.sampleStatus = (SampleStatus)Enum.Parse(typeof(SampleStatus), rowInfo["SampleStatus"].ToString()); this.PreFloorStatus = this.floorStatus; this.fromStationId = TengDa._Convert.StrToInt(rowInfo["FromStationId"].ToString(), -1); }