/// <summary>
 /// Create a new PRE_DETALLE object.
 /// </summary>
 /// <param name="pRD_ID">Initial value of the PRD_ID property.</param>
 /// <param name="cIA_CODIGO">Initial value of the CIA_CODIGO property.</param>
 /// <param name="pRE_NUMERO">Initial value of the PRE_NUMERO property.</param>
 /// <param name="hOP_CODIGO">Initial value of the HOP_CODIGO property.</param>
 /// <param name="iNV_CODIGO">Initial value of the INV_CODIGO property.</param>
 /// <param name="pRD_COSTOUNITARIO">Initial value of the PRD_COSTOUNITARIO property.</param>
 /// <param name="pRD_CANTIDAD">Initial value of the PRD_CANTIDAD property.</param>
 /// <param name="pRD_COSTOTOTAL">Initial value of the PRD_COSTOTOTAL property.</param>
 /// <param name="pRD_APLICARIMPVTAS">Initial value of the PRD_APLICARIMPVTAS property.</param>
 public static PRE_DETALLE CreatePRE_DETALLE(global::System.Int32 pRD_ID, global::System.String cIA_CODIGO, global::System.Double pRE_NUMERO, global::System.String hOP_CODIGO, global::System.String iNV_CODIGO, global::System.Double pRD_COSTOUNITARIO, global::System.Double pRD_CANTIDAD, global::System.Double pRD_COSTOTOTAL, global::System.Int32 pRD_APLICARIMPVTAS)
 {
     PRE_DETALLE pRE_DETALLE = new PRE_DETALLE();
     pRE_DETALLE.PRD_ID = pRD_ID;
     pRE_DETALLE.CIA_CODIGO = cIA_CODIGO;
     pRE_DETALLE.PRE_NUMERO = pRE_NUMERO;
     pRE_DETALLE.HOP_CODIGO = hOP_CODIGO;
     pRE_DETALLE.INV_CODIGO = iNV_CODIGO;
     pRE_DETALLE.PRD_COSTOUNITARIO = pRD_COSTOUNITARIO;
     pRE_DETALLE.PRD_CANTIDAD = pRD_CANTIDAD;
     pRE_DETALLE.PRD_COSTOTOTAL = pRD_COSTOTOTAL;
     pRE_DETALLE.PRD_APLICARIMPVTAS = pRD_APLICARIMPVTAS;
     return pRE_DETALLE;
 }
示例#2
0
        private void GetBudgetDetail(IEnumerable<TaskDto> taskCollection, ICollection<PRE_DETALLE> detail)
        {
            var resources = new List<ResourceDto>();

            detail.Clear();
            GetResources(taskCollection, resources);
            var resourcesCopy = CopyResources(resources);

            var listItems = resourcesCopy.Select(x => x.Code).Distinct();

            foreach (var tmpItem in listItems)
            {
                var preDetalle = new PRE_DETALLE();
                var item = OnlyOneFromSeveral(resourcesCopy.Where(x => x.Code.Equals(tmpItem)).ToList());
                Map(item, preDetalle);
                detail.Add(preDetalle);
            }
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the PRE_DETALLE EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToPRE_DETALLE(PRE_DETALLE pRE_DETALLE)
 {
     base.AddObject("PRE_DETALLE", pRE_DETALLE);
 }
示例#4
0
 private void Map(ResourceDto source, PRE_DETALLE destination)
 {
     destination.PRD_ID = 1; // No tengo ni idea de que es este id o como se llena
     destination.CIA_CODIGO = "01";
     destination.HOP_CODIGO = GetBudgetSheet(source.ResourceType.Name);
     destination.INV_CODIGO = source.Code;
     destination.PRD_DESCRIPCION = source.Name;
     destination.PRD_COSTOUNITARIO = Convert.ToDouble(source.Cost);
     destination.PRD_CANTIDAD = source.Amount;
     destination.PRD_COSTOTOTAL = Convert.ToDouble(source.TotalCost);
     destination.PRD_APLICARIMPVTAS = 0;
 }