Esempio n. 1
0
        public Boolean MtdActualizarStockProductos(ClsEProductos objCar)
        {
            try
            {
                ClsConexion  Objconexion = new ClsConexion();
                MySqlCommand ObjCommand  = new MySqlCommand();
                ObjCommand.Connection  = Objconexion.conectar();
                ObjCommand.CommandText = "usp_E_ModificarStock";
                ObjCommand.CommandType = CommandType.StoredProcedure;
                ObjCommand.Parameters.Add(new MySqlParameter("Acod", MySqlDbType.VarChar));
                ObjCommand.Parameters.Add(new MySqlParameter("Acant", MySqlDbType.Int32));
                ObjCommand.Parameters["Acod"].Value  = objCar.codprod;
                ObjCommand.Parameters["Acant"].Value = objCar.cantprod;
                ObjCommand.Connection = Objconexion.conectar();
                ObjCommand.ExecuteNonQuery();
                return(true);
            }
            catch (Exception ex)
            {
                return(false);

                throw ex;
            }
        }
Esempio n. 2
0
        public Boolean MtdActualizarPlataforma(ClsEPlataforma objCar)
        {
            try
            {
                ClsConexion  Objconexion = new ClsConexion();
                MySqlCommand ObjCommand  = new MySqlCommand();
                ObjCommand.Connection  = Objconexion.conectar();
                ObjCommand.CommandText = "usp_E_ModificarPlataforma";
                ObjCommand.CommandType = CommandType.StoredProcedure;
                ObjCommand.Parameters.Add(new MySqlParameter("Acod", MySqlDbType.VarChar));
                ObjCommand.Parameters.Add(new MySqlParameter("Anom", MySqlDbType.VarChar));
                ObjCommand.Parameters["Acod"].Value = objCar.codplat;
                ObjCommand.Parameters["Anom"].Value = objCar.nomplat;
                ObjCommand.Connection = Objconexion.conectar();
                ObjCommand.ExecuteNonQuery();
                return(true);
            }
            catch (Exception ex)
            {
                return(false);

                throw ex;
            }
        }
        public Boolean MtdAgregarProveedor(ClsEProveedores objCar)
        {
            try
            {
                ClsConexion  Objconexion = new ClsConexion();
                MySqlCommand Objcomando  = new MySqlCommand();
                Objcomando.Connection  = Objconexion.conectar();
                Objcomando.CommandText = "usp_A_IngresarProveedor";
                Objcomando.CommandType = CommandType.StoredProcedure;
                Objcomando.Parameters.Add(new MySqlParameter("Acod", MySqlDbType.VarChar));
                Objcomando.Parameters.Add(new MySqlParameter("Anom", MySqlDbType.VarChar));
                Objcomando.Parameters["Acod"].Value = objCar.rucprov;
                Objcomando.Parameters["Anom"].Value = objCar.nomprov;
                Objcomando.Connection = Objconexion.conectar();
                Objcomando.ExecuteNonQuery();
                return(true);
            }
            catch (Exception ex)
            {
                return(false);

                throw ex;
            }
        }