internal AssemblyLineInfo(DataModels.FAssemblylineinfo data) : this() { this.Id = data.Id; this.AssemblyLineId = data.AssemblyLineId; this.AssemblyLineTitle = data.AssemblyLineTitle; this.ProcessId = data.ProcessId; this.FactoryId = data.FactoryId; this.Parameter1 = data.Parameter1; this.Parameter2 = data.Parameter2; }
/// <summary> /// 获取工厂的生产线信息 /// </summary> /// <param name="strAssemblyLineId">生产线编号</param> /// <returns></returns> public AssemblyLineInfo GetAssemblyLine(string strAssemblyLineId) { try { DataModels.HnfactoryautodbDB dataContext = new DataModels.HnfactoryautodbDB(); DataModels.FAssemblylineinfo data = dataContext.FAssemblylineinfoes.SingleOrDefault(c => c.AssemblyLineId == strAssemblyLineId); if (data != null) { return(new AssemblyLineInfo(data)); } else { return(null); } } catch { throw; } }