Exemplo n.º 1
0
        public bool GuardarVenta(VentaBE objVenta, out string IdVenta, out string mensaje)
        {
            VentaDA objVentaDA = new VentaDA();

            try
            {
                /*if (objVenta.Nombre == "")
                 * {
                 *  IdVenta = "0";
                 *  mensaje = "El nombre del Venta no puede estar vacio.";
                 *  return false;
                 * }*/
                if (objVentaDA.GuardarVenta(objVenta, out IdVenta))
                {
                    mensaje = "Se registro al Venta.";
                    return(true);
                }
                else
                {
                    IdVenta = "0";
                    mensaje = "Ocurrio un error al guardar al Venta.";
                    return(false);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 2
0
 public VentaBL(int idCliente)
 {
     CnxCliente          = ConfigurationManager.AppSettings[idCliente.ToString()].ToString();
     strCnx              = ConfigurationManager.ConnectionStrings[CnxCliente].ConnectionString;
     strCnxRule          = ConfigurationManager.ConnectionStrings["cnxRules"].ConnectionString;
     oVentaDA            = new VentaDA();
     oMaestrosDA         = new MaestrosDA();
     oArchivosAdjuntosBL = new ArchivosAdjuntosBL();
 }
Exemplo n.º 3
0
        public VentaBE ObtenerVenta(string IdVenta)
        {
            VentaDA oVentaDA = new VentaDA();

            try
            {
                VentaBE ObjVenta = oVentaDA.ObtenerVenta(IdVenta);
                return(ObjVenta);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 4
0
        public List <VentaBE> ListarVentas()
        {
            VentaDA oVentaDA = new VentaDA();

            try
            {
                return(oVentaDA.ListarVentas());
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                oVentaDA = null;
            }
        }
Exemplo n.º 5
0
        public bool EliminarVenta(string IdVenta)
        {
            VentaDA objVentaDA = new VentaDA();

            try
            {
                if (objVentaDA.EliminarVenta(IdVenta))
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 6
0
        public bool ActualizarVenta(VentaBE objVenta)
        {
            VentaDA objVentaDA = new VentaDA();

            try
            {
                if (objVentaDA.ActualizarVenta(objVenta))
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }