Exemplo n.º 1
0
        private tblRecepcion fillCabezera(ReceptionDTO receptionDTO, String emplazamiento, String tipo)
        {
            tblRecepcion recepcion = new tblRecepcion();

            recepcion.recc_contacto         = String.Empty;
            recepcion.recc_despacho         = String.Empty;
            recepcion.recc_ordenCompra      = String.Empty;
            recepcion.recc_motivoDevolucion = String.Empty;
            recepcion.recc_observaciones    = String.Empty;
            recepcion.recc_emplazamiento    = emplazamiento;
            recepcion.recc_trec_codigo      = tipo;
            //recepcion.recc_numero = receptionDTO.F4201_DOCO; JHV 28/06 se pasa a trabajar con la OT.
            recepcion.recc_numero = receptionDTO.F4211_RORN;

            if (!String.IsNullOrWhiteSpace(receptionDTO.F4201_OPDJ))
            {
                string result = DateTime.ParseExact(receptionDTO.F4201_OPDJ, "yyyyMMdd", CultureInfo.InvariantCulture).ToString("yyyy/MM/dd");
                recepcion.recc_fechaEntrega = Utils.ParseDate(result, "yyyy/MM/dd");
            }
            else
            {
                recepcion.recc_fechaEntrega = Utils.ParseDate(Constants.FECHA_DEFAULT, "yyyy/MM/dd");
            }

            recepcion.recc_proveedor = !String.IsNullOrWhiteSpace(receptionDTO.F4211_AN8) ? receptionDTO.F4211_AN8.Trim() : String.Empty;
            recepcion.recc_almacen   = FilePropertyUtils.Instance.GetValueString(Constants.ALMACEN, recepcion.recc_proveedor);

            // VERY HARDCODE
            recepcion.recc_fechaEmision = Utils.ParseDate(Constants.FECHA_DEFAULT, "yyyy/MM/dd");

            return(recepcion);
        }
Exemplo n.º 2
0
 public void MappingReceptionDTORecepcion(List <ReceptionDTO> receptionDTOList, Dictionary <String, tblRecepcion> dictionary, String emplazamiento)
 {
     foreach (ReceptionDTO receptionDTO in receptionDTOList)
     {
         tblRecepcion recepcion = null;
         //dictionary.TryGetValue(receptionDTO.F4201_DOCO, out recepcion); JHV 28/06 se pasa a trabajar con la OT.
         dictionary.TryGetValue(receptionDTO.F4211_RORN, out recepcion);
         if (recepcion == null)
         {
             String tipo = FilePropertyUtils.Instance.GetValueString(Constants.INTERFACE_RECEPCION + "." + Constants.TIPO, receptionDTO.F4201_DCTO);
             /* CABEZERA */
             recepcion = fillCabezera(receptionDTO, emplazamiento, tipo);
             /* DETALLE */
             tblRecepcionDetalle detalle = fillDetalle(receptionDTO);
             recepcion.tblRecepcionDetalle.Add(detalle);
             //dictionary.Add(receptionDTO.F4201_DOCO, recepcion);
             dictionary.Add(receptionDTO.F4211_RORN, recepcion);
         }
         else
         {
             /* DETALLE */
             tblRecepcionDetalle detalle = fillDetalle(receptionDTO);
             recepcion.tblRecepcionDetalle.Add(detalle);
         }
     }
 }
Exemplo n.º 3
0
        private tblRecepcion fillCabezera(ReceptionDTO receptionDTO, String emplazamiento)
        {
            tblRecepcion recepcion = new tblRecepcion();

            recepcion.recc_contacto         = String.Empty;
            recepcion.recc_despacho         = String.Empty;
            recepcion.recc_ordenCompra      = String.Empty;
            recepcion.recc_motivoDevolucion = String.Empty;
            recepcion.recc_observaciones    = String.Empty;
            recepcion.recc_emplazamiento    = emplazamiento;
            recepcion.recc_trec_codigo      = receptionDTO.F4201_DCTO;
            recepcion.recc_numero           = receptionDTO.F4201_DOCO;

            if (!String.IsNullOrWhiteSpace(receptionDTO.F4201_OPDJ))
            {
                string result = DateTime.ParseExact(receptionDTO.F4201_OPDJ, "yyyyMMdd", CultureInfo.InvariantCulture).ToString("yyyy/MM/dd");
                recepcion.recc_fechaEntrega = Utils.ParseDate(result, "yyyy/MM/dd");
            }
            else
            {
                recepcion.recc_fechaEntrega = Utils.ParseDate(Constants.FECHA_DEFAULT, "yyyy/MM/dd");
            }

            recepcion.recc_proveedor = !String.IsNullOrWhiteSpace(receptionDTO.F4211_MCU) ? receptionDTO.F4211_MCU.Trim() : String.Empty;

            // VERY HARDCODE
            recepcion.recc_fechaEmision = Utils.ParseDate(Constants.FECHA_DEFAULT, "yyyy/MM/dd");

            return(recepcion);
        }
Exemplo n.º 4
0
 public void MappingReceptionDTORecepcion(List <ReceptionDTO> receptionDTOList, Dictionary <String, tblRecepcion> dictionary, String emplazamiento)
 {
     foreach (ReceptionDTO receptionDTO in receptionDTOList)
     {
         tblRecepcion recepcion = null;
         dictionary.TryGetValue(receptionDTO.F4201_DOCO, out recepcion);
         if (recepcion == null)
         {
             /* CABEZERA */
             recepcion = fillCabezera(receptionDTO, emplazamiento);
             /* DETALLE */
             tblRecepcionDetalle detalle = fillDetalle(receptionDTO);
             recepcion.tblRecepcionDetalle.Add(detalle);
             dictionary.Add(receptionDTO.F4201_DOCO, recepcion);
         }
         else
         {
             /* DETALLE */
             tblRecepcionDetalle detalle = fillDetalle(receptionDTO);
             recepcion.tblRecepcionDetalle.Add(detalle);
         }
     }
 }
Exemplo n.º 5
0
 public void Update(tblRecepcion obj)
 {
     dao.Update(obj);
 }
Exemplo n.º 6
0
 public bool Save(tblRecepcion obj)
 {
     return(dao.Save(obj));
 }