Exemplo n.º 1
0
 //ELIMINAR PRODUCTO
 public bool EliminarProducto(int Id)
 {
     try
     {
         List <SqlParameter> param = new List <SqlParameter>()
         {
             new SqlParameter("@Accion", 5),
             new SqlParameter("@Id", Id),
         };
         DataTable registro = new ClsSQL().ExecuteSp("ProductosAcklen", param);
     }
     catch (Exception er)
     {
         return(false);
     }
     return(true);
 }
Exemplo n.º 2
0
        //LLENAR GRID
        public DataTable Grid()
        {
            DataTable registro;

            try
            {
                List <SqlParameter> param = new List <SqlParameter>()
                {
                    new SqlParameter("@Accion", 1)
                };
                registro = new ClsSQL().ExecuteSp("ProductosAcklen", param);
            }
            catch (Exception e)
            {
                registro = null;
            }
            return(registro);
        }
Exemplo n.º 3
0
        //CONSULTAR PRODUCTO MEDIANTE EL ID
        public DataTable ProductoMedianteID(int Id)
        {
            DataTable registro;

            try
            {
                List <SqlParameter> param = new List <SqlParameter>()
                {
                    new SqlParameter("@Accion", 4),
                    new SqlParameter("@Id", Id),
                };
                registro = new ClsSQL().ExecuteSp("ProductosAcklen", param);
            }
            catch (Exception e)
            {
                registro = null;
            }
            return(registro);
        }
Exemplo n.º 4
0
 //INSERTAR PRODUCTO
 public bool InsertarProducto(string Nombre, string Precio, string Existencia)
 {
     try
     {
         List <SqlParameter> param = new List <SqlParameter>()
         {
             new SqlParameter("@Accion", 2),
             new SqlParameter("@Nombre", Nombre),
             new SqlParameter("@Precio", Precio),
             new SqlParameter("@Existencia", Existencia),
         };
         DataTable registro = new ClsSQL().ExecuteSp("ProductosAcklen", param);
     }
     catch (Exception er)
     {
         return(false);
     }
     return(true);
 }