예제 #1
0
        public EntResponseTPlay guardaAllTPlay(EntPersonaTPlay persona, EntDomicilioClienteTPlay domicilio, EntVentaTPlay infoVenta)
        {
            EntResponseTPlay response = new EntResponseTPlay();
            EntVentaTPlay    infoVentaAux = infoVenta;
            int personaIdAux = 0, domicilioIdAux = 0;

            //Guardamos el cliente
            response = guardaPersonaTPlay(persona);
            if (response.personaId > 0 && !response.EstadoOperacion.Status)
            {
                personaIdAux           = response.personaId;
                infoVentaAux.personaId = personaIdAux;
                //Guardamos el domicilio
                response = guardaDomicilioTPlay(domicilio);
                if (response.domicilioId > 0 && !response.EstadoOperacion.Status)
                {
                    domicilioIdAux            = response.domicilioId;
                    infoVentaAux.idDomicilioI = domicilioIdAux;
                    //Guardamos la relacion de venta
                    response = guardaVentaTPlay(infoVentaAux);
                    if (!response.EstadoOperacion.Status)
                    {
                        response = new EntResponseTPlay {
                            EstadoOperacion = new EstadoOperacion(), personaId = personaIdAux, domicilioId = domicilioIdAux
                        };
                    }
                    else
                    {
                        response = new EntResponseTPlay {
                            EstadoOperacion = response.EstadoOperacion, personaId = personaIdAux, domicilioId = domicilioIdAux
                        };
                    }//end if 3
                }
                else
                {
                    response = new EntResponseTPlay {
                        EstadoOperacion = response.EstadoOperacion, personaId = personaIdAux, domicilioId = domicilioIdAux
                    };
                }//end if 2
            }
            else
            {
                response = new EntResponseTPlay {
                    EstadoOperacion = response.EstadoOperacion, personaId = personaIdAux, domicilioId = domicilioIdAux
                };
            }//end if 1
            return(response);
        }
예제 #2
0
 public EntResponseTPlay guardaDomicilioTPlay(EntDomicilioClienteTPlay domicilio)
 {
     return(new CtrlCombosTotalPlay().guardaDomicilioTPlay(domicilio));
 }