Esempio n. 1
0
 public List <in_movi_inve_detalle_Info> Get_List_StockAFecha(int IdEmpresa, int IdSucursal, int IdBodega, DateTime Fecha)
 {
     try
     {
         List <in_movi_inve_detalle_Info> Lst = new List <in_movi_inve_detalle_Info>();
         using (EntitiesInventario Entity = new EntitiesInventario())
         {
             ObjectResult <spIn_Inventario_Obtener_Stock_A_Fecha_Result> Consulta = Entity.spIn_Inventario_Obtener_Stock_A_Fecha(Fecha, IdEmpresa, IdSucursal, IdBodega);
             foreach (var item in Consulta)
             {
                 in_movi_inve_detalle_Info Obj = new in_movi_inve_detalle_Info();
                 Obj.dm_cantidad = Convert.ToDouble(item.Cantidad);
                 Obj.IdProducto  = item.IdProducto;
                 Lst.Add(Obj);
             }
         }
         return(Lst);
     }
     catch (Exception ex)
     {
         string arreglo = ToString();
         tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
         tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
         oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
         mensaje = ex.ToString() + " " + ex.Message;
         throw new Exception(ex.ToString());
     }
 }