示例#1
0
        public static Comanda SeleccionarComanda(string id)
        {
            Comanda comanda = null;

            SqlDataReader data = null;

            try
            {
                data = ComandaDato.SeleccionarComanda(id);

                while (data.Read())
                {
                    comanda = new Comanda();

                    comanda.comanda_id     = data["comanda_id"].ToString();
                    comanda.estadoComanda  = EstadoComandaLN.SeleccionarEstadoComanda(data["estadoComanda_id"].ToString());
                    comanda.mesa           = MesaLN.SeleccionarMesa(data["mesa_id"].ToString());
                    comanda.estadoCuenta   = EstadoCuentaLN.SeleccionarEstadoCuenta(data["estadoCuenta_id"].ToString());
                    comanda.nombreCliente  = data["nombreCliente"].ToString();
                    comanda.usuarioComanda = UsuarioLN.SeleccionarUsuarioPorId(data["usuario_id"].ToString());
                }


                return(comanda);
            }
            catch (Exception ex)
            {
                throw;
            }
            finally
            {
                data.Close();
            }
        }
示例#2
0
        public static DataTable obtenerReporteFiltrado(string comandaId)
        {
            DataTable dt = new DataTable();

            dt = ComandaDato.reporteFactura(comandaId);

            return(dt);
        }
示例#3
0
        public static DataTable obtenerVentasFiltrado(DateTime fecha_ini, DateTime fecha_fin, string criterio, int opcion)
        {
            DataTable dt = new DataTable();

            dt = ComandaDato.reporteVentasFiltrado(fecha_ini, fecha_fin, criterio, opcion);

            return(dt);
        }
示例#4
0
        public static DataTable obtenerVentasPorMetodoPago(DateTime fecha_ini, DateTime fecha_fin, string metodo)
        {
            DataTable dt = new DataTable();

            dt = ComandaDato.reporteVentasPorMetodoPago(fecha_ini, fecha_fin, metodo);

            return(dt);
        }
示例#5
0
        public static DataTable obtenerVentasPorFecha(DateTime fecha_ini, DateTime fecha_fin, string estado)
        {
            DataTable dt = new DataTable();

            dt = ComandaDato.reporteVentasPorFecha(fecha_ini, fecha_fin, estado);

            return(dt);
        }
示例#6
0
        public static List <Comanda> ObtenerTodos(string estadoComanda)
        {
            List <Comanda> lista = new List <Comanda>();
            DataSet        ds    = ComandaDato.SeleccionarTodos(estadoComanda);

            foreach (DataRow fila in ds.Tables[0].Rows)
            {
                Comanda registro = new Comanda();

                registro.comanda_id     = fila["comanda_id"].ToString();
                registro.estadoComanda  = EstadoComandaLN.SeleccionarEstadoComanda(fila["estadoComanda_id"].ToString());
                registro.mesa           = MesaLN.SeleccionarMesa(fila["mesa_id"].ToString());
                registro.estadoCuenta   = EstadoCuentaLN.SeleccionarEstadoCuenta(fila["estadoCuenta_id"].ToString());
                registro.nombreCliente  = fila["nombreCliente"].ToString();
                registro.usuarioComanda = UsuarioLN.SeleccionarUsuarioPorId(fila["usuario_id"].ToString());

                lista.Add(registro);
            }
            return(lista);
        }
示例#7
0
 public static void Modificar(Comanda comanda)
 {
     ComandaDato.Modificar(comanda);
 }
示例#8
0
 public static void Nuevo(Comanda comanda)
 {
     ComandaDato.Insertar(comanda);
 }