/// <summary>
 /// Create a new reporte_total_inventario_de_cafe_por_socio object.
 /// </summary>
 /// <param name="tRANSACCION_NUMERO">Initial value of the TRANSACCION_NUMERO property.</param>
 /// <param name="sOCIOS_ID">Initial value of the SOCIOS_ID property.</param>
 /// <param name="cLASIFICACIONES_CAFE_ID">Initial value of the CLASIFICACIONES_CAFE_ID property.</param>
 /// <param name="cLASIFICACIONES_CAFE_NOMBRE">Initial value of the CLASIFICACIONES_CAFE_NOMBRE property.</param>
 /// <param name="iNVENTARIO_ENTRADAS_CANTIDAD">Initial value of the INVENTARIO_ENTRADAS_CANTIDAD property.</param>
 /// <param name="iNVENTARIO_SALIDAS_SALDO">Initial value of the INVENTARIO_SALIDAS_SALDO property.</param>
 /// <param name="cREADO_POR">Initial value of the CREADO_POR property.</param>
 /// <param name="fECHA_CREACION">Initial value of the FECHA_CREACION property.</param>
 public static reporte_total_inventario_de_cafe_por_socio Createreporte_total_inventario_de_cafe_por_socio(global::System.Int32 tRANSACCION_NUMERO, global::System.String sOCIOS_ID, global::System.Int32 cLASIFICACIONES_CAFE_ID, global::System.String cLASIFICACIONES_CAFE_NOMBRE, global::System.Decimal iNVENTARIO_ENTRADAS_CANTIDAD, global::System.Decimal iNVENTARIO_SALIDAS_SALDO, global::System.String cREADO_POR, global::System.DateTime fECHA_CREACION)
 {
     reporte_total_inventario_de_cafe_por_socio reporte_total_inventario_de_cafe_por_socio = new reporte_total_inventario_de_cafe_por_socio();
     reporte_total_inventario_de_cafe_por_socio.TRANSACCION_NUMERO = tRANSACCION_NUMERO;
     reporte_total_inventario_de_cafe_por_socio.SOCIOS_ID = sOCIOS_ID;
     reporte_total_inventario_de_cafe_por_socio.CLASIFICACIONES_CAFE_ID = cLASIFICACIONES_CAFE_ID;
     reporte_total_inventario_de_cafe_por_socio.CLASIFICACIONES_CAFE_NOMBRE = cLASIFICACIONES_CAFE_NOMBRE;
     reporte_total_inventario_de_cafe_por_socio.INVENTARIO_ENTRADAS_CANTIDAD = iNVENTARIO_ENTRADAS_CANTIDAD;
     reporte_total_inventario_de_cafe_por_socio.INVENTARIO_SALIDAS_SALDO = iNVENTARIO_SALIDAS_SALDO;
     reporte_total_inventario_de_cafe_por_socio.CREADO_POR = cREADO_POR;
     reporte_total_inventario_de_cafe_por_socio.FECHA_CREACION = fECHA_CREACION;
     return reporte_total_inventario_de_cafe_por_socio;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the reporte_total_inventario_de_cafe_por_socio EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToreporte_total_inventario_de_cafe_por_socio(reporte_total_inventario_de_cafe_por_socio reporte_total_inventario_de_cafe_por_socio)
 {
     base.AddObject("reporte_total_inventario_de_cafe_por_socio", reporte_total_inventario_de_cafe_por_socio);
 }
Пример #3
0
        /// <summary>
        /// Obtiene totales de inventario de café para socio específico.
        /// </summary>
        /// <param name="SOCIOS_ID"></param>
        /// <param name="CLASIFICACIONES_CAFE_ID"></param>
        /// <returns>Totales de inventario de café para socio específico.</returns>
        public reporte_total_inventario_de_cafe_por_socio GetReporteTotalInventarioDeCafeDeSocio(string SOCIOS_ID, int CLASIFICACIONES_CAFE_ID)
        {
            try
            {
                using (var db = new colinasEntities())
                {
                    IEnumerable<KeyValuePair<string, object>> entityKeyValues =
                        new KeyValuePair<string, object>[] {
                            new KeyValuePair<string, object>("SOCIOS_ID", SOCIOS_ID),
                            new KeyValuePair<string, object>("CLASIFICACIONES_CAFE_ID", CLASIFICACIONES_CAFE_ID) };

                    EntityKey k = new EntityKey("colinasEntities.reporte_total_inventario_de_cafe_por_socio", entityKeyValues);

                    Object invCafSoc = null;

                    reporte_total_inventario_de_cafe_por_socio asocInventory = null;

                    if (db.TryGetObjectByKey(k, out invCafSoc))
                        asocInventory = (reporte_total_inventario_de_cafe_por_socio)invCafSoc;
                    else
                        asocInventory = new reporte_total_inventario_de_cafe_por_socio();

                    return asocInventory;
                }
            }
            catch (Exception ex)
            {
                log.Fatal("Error fatal al obtener reporte total de inventario de cafe de socio.", ex);
                throw;
            }
        }