コード例 #1
0
 public List <in_movi_inve_detalle_Info> Get_List_CuerpoKardex(int IdEmpresa, int IdSucursal, int IdBodega, decimal IdProducto, DateTime FechaIncial, DateTime FechaFinal)
 {
     try
     {
         List <in_movi_inve_detalle_Info> lst = new List <in_movi_inve_detalle_Info>();
         using (EntitiesInventario entity = new EntitiesInventario())
         {
             ObjectResult <spIn_CuerpoDelCardex_Result> resultado = entity.spIn_CuerpoDelCardex(IdEmpresa, IdBodega, IdSucursal, IdProducto, FechaIncial, FechaFinal);
             foreach (var item in resultado)
             {
                 in_movi_inve_detalle_Info det = new in_movi_inve_detalle_Info();
                 det.Fecha         = item.cm_fecha;
                 det.NomProducto   = item.pr_descripcion;
                 det.Sucursal      = item.Su_Descripcion;
                 det.Bodega        = item.bo_Descripcion;
                 det.TipoMoviInven = item.Mov_Inv_Tipo;
                 det.mv_tipo_movi  = item.mv_tipo_movi;
                 det.dm_cantidad   = item.dm_cantidad;
                 det.peso          = item.dm_peso;
                 lst.Add(det);
             }
         }
         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());
     }
 }