Inheritance: VProductModelInstructionsBase
コード例 #1
0
        ///<summary>
        /// A simple factory method to create a new <see cref="VProductModelInstructions"/> instance.
        ///</summary>
        ///<param name="_productModelId"></param>
        ///<param name="_name"></param>
        ///<param name="_instructions"></param>
        ///<param name="_locationId"></param>
        ///<param name="_setupHours"></param>
        ///<param name="_machineHours"></param>
        ///<param name="_laborHours"></param>
        ///<param name="_lotSize"></param>
        ///<param name="_step"></param>
        ///<param name="_rowguid"></param>
        ///<param name="_modifiedDate"></param>
        public static VProductModelInstructions CreateVProductModelInstructions(System.Int32 _productModelId, System.String _name, System.String _instructions, System.Int32?_locationId, System.Decimal?_setupHours, System.Decimal?_machineHours, System.Decimal?_laborHours, System.Int32?_lotSize, System.String _step, System.Guid _rowguid, System.DateTime _modifiedDate)
        {
            VProductModelInstructions newVProductModelInstructions = new VProductModelInstructions();

            newVProductModelInstructions.ProductModelId = _productModelId;
            newVProductModelInstructions.Name           = _name;
            newVProductModelInstructions.Instructions   = _instructions;
            newVProductModelInstructions.LocationId     = _locationId;
            newVProductModelInstructions.SetupHours     = _setupHours;
            newVProductModelInstructions.MachineHours   = _machineHours;
            newVProductModelInstructions.LaborHours     = _laborHours;
            newVProductModelInstructions.LotSize        = _lotSize;
            newVProductModelInstructions.Step           = _step;
            newVProductModelInstructions.Rowguid        = _rowguid;
            newVProductModelInstructions.ModifiedDate   = _modifiedDate;
            return(newVProductModelInstructions);
        }
コード例 #2
0
        ///<summary>
        ///  Returns a Typed VProductModelInstructionsBase Entity
        ///</summary>
        public virtual VProductModelInstructionsBase Copy()
        {
            //shallow copy entity
            VProductModelInstructions copy = new VProductModelInstructions();

            copy.ProductModelId = this.ProductModelId;
            copy.Name           = this.Name;
            copy.Instructions   = this.Instructions;
            copy.LocationId     = this.LocationId;
            copy.SetupHours     = this.SetupHours;
            copy.MachineHours   = this.MachineHours;
            copy.LaborHours     = this.LaborHours;
            copy.LotSize        = this.LotSize;
            copy.Step           = this.Step;
            copy.Rowguid        = this.Rowguid;
            copy.ModifiedDate   = this.ModifiedDate;
            copy.AcceptChanges();
            return((VProductModelInstructions)copy);
        }
コード例 #3
0
        /// <summary>
        /// Gets the property value by name.
        /// </summary>
        /// <param name="entity">The entity.</param>
        /// <param name="propertyName">Name of the property.</param>
        /// <returns></returns>
        public static object GetPropertyValueByName(VProductModelInstructions entity, string propertyName)
        {
            switch (propertyName)
            {
            case "ProductModelId":
                return(entity.ProductModelId);

            case "Name":
                return(entity.Name);

            case "Instructions":
                return(entity.Instructions);

            case "LocationId":
                return(entity.LocationId);

            case "SetupHours":
                return(entity.SetupHours);

            case "MachineHours":
                return(entity.MachineHours);

            case "LaborHours":
                return(entity.LaborHours);

            case "LotSize":
                return(entity.LotSize);

            case "Step":
                return(entity.Step);

            case "Rowguid":
                return(entity.Rowguid);

            case "ModifiedDate":
                return(entity.ModifiedDate);
            }
            return(null);
        }
コード例 #4
0
		/// <summary>
		/// Gets the property value by name.
		/// </summary>
		/// <param name="entity">The entity.</param>
		/// <param name="propertyName">Name of the property.</param>
		/// <returns></returns>
		public static object GetPropertyValueByName(VProductModelInstructions entity, string propertyName)
		{
			switch (propertyName)
			{
				case "ProductModelId":
					return entity.ProductModelId;
				case "Name":
					return entity.Name;
				case "Instructions":
					return entity.Instructions;
				case "LocationId":
					return entity.LocationId;
				case "SetupHours":
					return entity.SetupHours;
				case "MachineHours":
					return entity.MachineHours;
				case "LaborHours":
					return entity.LaborHours;
				case "LotSize":
					return entity.LotSize;
				case "Step":
					return entity.Step;
				case "Rowguid":
					return entity.Rowguid;
				case "ModifiedDate":
					return entity.ModifiedDate;
			}
			return null;
		}
コード例 #5
0
		///<summary>
		///  Returns a Typed VProductModelInstructionsBase Entity 
		///</summary>
		public virtual VProductModelInstructionsBase Copy()
		{
			//shallow copy entity
			VProductModelInstructions copy = new VProductModelInstructions();
				copy.ProductModelId = this.ProductModelId;
				copy.Name = this.Name;
				copy.Instructions = this.Instructions;
				copy.LocationId = this.LocationId;
				copy.SetupHours = this.SetupHours;
				copy.MachineHours = this.MachineHours;
				copy.LaborHours = this.LaborHours;
				copy.LotSize = this.LotSize;
				copy.Step = this.Step;
				copy.Rowguid = this.Rowguid;
				copy.ModifiedDate = this.ModifiedDate;
			copy.AcceptChanges();
			return (VProductModelInstructions)copy;
		}
コード例 #6
0
		///<summary>
		/// A simple factory method to create a new <see cref="VProductModelInstructions"/> instance.
		///</summary>
		///<param name="_productModelId"></param>
		///<param name="_name"></param>
		///<param name="_instructions"></param>
		///<param name="_locationId"></param>
		///<param name="_setupHours"></param>
		///<param name="_machineHours"></param>
		///<param name="_laborHours"></param>
		///<param name="_lotSize"></param>
		///<param name="_step"></param>
		///<param name="_rowguid"></param>
		///<param name="_modifiedDate"></param>
		public static VProductModelInstructions CreateVProductModelInstructions(System.Int32 _productModelId, System.String _name, System.String _instructions, System.Int32? _locationId, System.Decimal? _setupHours, System.Decimal? _machineHours, System.Decimal? _laborHours, System.Int32? _lotSize, System.String _step, System.Guid _rowguid, System.DateTime _modifiedDate)
		{
			VProductModelInstructions newVProductModelInstructions = new VProductModelInstructions();
			newVProductModelInstructions.ProductModelId = _productModelId;
			newVProductModelInstructions.Name = _name;
			newVProductModelInstructions.Instructions = _instructions;
			newVProductModelInstructions.LocationId = _locationId;
			newVProductModelInstructions.SetupHours = _setupHours;
			newVProductModelInstructions.MachineHours = _machineHours;
			newVProductModelInstructions.LaborHours = _laborHours;
			newVProductModelInstructions.LotSize = _lotSize;
			newVProductModelInstructions.Step = _step;
			newVProductModelInstructions.Rowguid = _rowguid;
			newVProductModelInstructions.ModifiedDate = _modifiedDate;
			return newVProductModelInstructions;
		}
		/// <summary>
		/// Convert a nettiers collection to the ws proxy collection.
		/// </summary>
		public static VProductModelInstructions Convert(WsProxy.VProductModelInstructions item)
		{			
			VProductModelInstructions outItem = new VProductModelInstructions();			
			outItem.ProductModelId = item.ProductModelId;
			outItem.Name = item.Name;
			outItem.Instructions = item.Instructions;
			outItem.LocationId = item.LocationId;
			outItem.SetupHours = item.SetupHours;
			outItem.MachineHours = item.MachineHours;
			outItem.LaborHours = item.LaborHours;
			outItem.LotSize = item.LotSize;
			outItem.Step = item.Step;
			outItem.Rowguid = item.Rowguid;
			outItem.ModifiedDate = item.ModifiedDate;
							
			outItem.AcceptChanges();			
			return outItem;
		}
コード例 #8
0
		/// <summary>
		/// Deserialize the mock VProductModelInstructions entity from a temporary file.
		/// </summary>
		private void Step_7_DeserializeEntity_Generated()
		{
			string fileName = "temp_VProductModelInstructions.xml";
		
			XmlSerializer mySerializer = new XmlSerializer(typeof(VProductModelInstructions)); 
			System.IO.FileStream myFileStream = new System.IO.FileStream(fileName,  System.IO.FileMode.Open); 
			mock = (VProductModelInstructions) mySerializer.Deserialize(myFileStream);
			myFileStream.Close();
			System.IO.File.Delete(fileName);
			
			System.Console.WriteLine("mock correctly deserialized from a temporary file.");
		}
コード例 #9
0
		///<summary>
		///  Returns a Typed VProductModelInstructions Entity with mock values.
		///</summary>
		static public VProductModelInstructions CreateMockInstance()
		{		
			VProductModelInstructions mock = new VProductModelInstructions();
						
			mock.ProductModelId = TestUtility.Instance.RandomNumber();
			mock.Name = TestUtility.Instance.RandomString(24, false);;
			mock.Instructions = TestUtility.Instance.RandomString(2, false);;
			mock.LocationId = TestUtility.Instance.RandomNumber();
			mock.SetupHours = (decimal)TestUtility.Instance.RandomShort();
			mock.MachineHours = (decimal)TestUtility.Instance.RandomShort();
			mock.LaborHours = (decimal)TestUtility.Instance.RandomShort();
			mock.LotSize = TestUtility.Instance.RandomNumber();
			mock.Step = TestUtility.Instance.RandomString(499, false);;
			mock.Rowguid = Guid.NewGuid();
			mock.ModifiedDate = TestUtility.Instance.RandomDateTime();
		   return (VProductModelInstructions)mock;
		}